tags:

views:

69

answers:

2

Hi All,

I am new to Cassandra.

I have a column Family where the columns are sorted by "LexicalUUIDType".

How can I access timestamp of each column in such a ColumnFamily?

I need to the timestamp because I have to read the oldest entry.

I can not use "TimeUUIDType" for sorting columns.

Thanks,

+1  A: 

It depends on the library you are using. But if you are using the raw thrift api its something like (unreleased 0.7/trunk):

column.column.clock.timestamp

(To get all data you will have to use get_range_slices, start with "", and after each call use the last key as the start key in the next call)

Schildmeijer
A: 

You would have to get back all of the columns using get_slice http://wiki.apache.org/cassandra/API06#get_slice and then look at the timestamp field in each one. Or you can make another column family sorted by timeuuid which has the corresponding column in the first cf as the value. Query cf #2 with the time you want, and use the result to get from cf #1.

Zanson