访问Cassandra列的时间戳 [英] Accessing timestamp of a Cassandra column

查看:183
本文介绍了访问Cassandra列的时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Cassandra的新人。



我有一个列系列,其中列按LexicalUUIDType排序。



如何访问此列ColumnFamily中每列的时间戳?



我需要时间戳,因为我必须读取最旧的条目。

我无法使用TimeUUIDType排序列。



谢谢,

解决方案

这取决于您使用的库。但是如果你使用原始的thrift api它的东西像(未发布的0.7 / trunk):

  column.column.clock.timestamp 

(要获取所有数据,必须使用get_range_slices,以开头,在下一次调用中使用最后一个键作为开始键)


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,

解决方案

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)

这篇关于访问Cassandra列的时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆