Hi, dear Guys

I did some test to see if cassandra can store muti-version of the same
data, but from the below test code seems it only can store one
version's data, which is different from HBase.

Can somebody help to confirm this?
It will be very appreciative if some one are kindly enough to give me
a suggestion of how to use cassandra to store muti-version data
efficiently.

client.insert(keyspace, key1, path, "value1".getBytes(), timestamp1,
ConsistencyLevel.ALL);
client.insert(keyspace, key1, path, "value2".getBytes(), timestamp2,
ConsistencyLevel.ALL);

client.remove(keyspace, key1, path, timestamp2, ConsistencyLevel.ALL);

ColumnOrSuperColumn column = client.get(keyspace, key1, path,
ConsistencyLevel.ALL);
System.out.println(new String(column.column.value));

The result is:
NotFoundException()
        at 
org.apache.cassandra.thrift.Cassandra$get_result.read(Cassandra.java:3639)
        at 
org.apache.cassandra.thrift.Cassandra$Client.recv_get(Cassandra.java:344)
        at org.apache.cassandra.thrift.Cassandra$Client.get(Cassandra.java:319)
        at ThriftHelloWorld.main(ThriftHelloWorld.java:52)

Reply via email to