cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhen ye <>
Subject Is there any way to store muti-version data based on the timestamp?
Date Wed, 01 Dec 2010 12:23:04 GMT
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

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

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

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

The result is:
	at org.apache.cassandra.thrift.Cassandra$
	at org.apache.cassandra.thrift.Cassandra$Client.recv_get(
	at org.apache.cassandra.thrift.Cassandra$Client.get(
	at ThriftHelloWorld.main(

View raw message