View RSS Feed

Recent Blogs Posts

  1. Cassandra Delete Operation

    by , 02-23-2012 at 06:21 PM
    In this section, we will discuss that how we can delete a value from Cassandra database using Java code.
    Java Code: This is the code to explain Cassandra Delete Operation
    import org.apache.cassandra.thrift.Deletion;
    ...
    long timestamp =System.currentTimeMillis();
    List columns = new ArrayList();
    columns.add("email".getBytes());
    SlicePredicate slicePredicate = new SlicePredicate();
    slicePredicate.setColumn_names(columns);
    Deletion deletion = new Deletion(timestamp);
    deletion.setPredicate(slicePredicate);
    ...