在Cassandra,我如何访问历史数据?

时间:2021-12-24 12:36:32

Cassandra uses a timestamp system to serve up the most recent records. How do I display a list of all values & timestamps for a particular column?

Cassandra使用时间戳系统来提供最新记录。如何显示特定列的所有值和时间戳列表?

For example, I run this command for a Column family called 'Users':

例如,我为名为“Users”的Column系列运行此命令:

set Users[jsmith][first]='John'

When I get the 'first' column, I see the following:

当我得到“第一”专栏时,我看到以下内容:

get Users[jsmith][first] => (column=first value=John, timestamp=1287604215498000

get users [jsmith] [first] =>(column = first value = John,timestamp = 1287604215498000

Then, I update the 'first' column to Charlie. set Users[jsmith][first]='Charlie'

然后,我将“第一”列更新为查理。设置用户[jsmith] [first] ='查理'

I will now see the following

我现在将看到以下内容

get Users[jsmith][first] => (column=first value=Charlie, timestamp=1299980101189000

get users [jsmith] [first] =>(column = first value = Charlie,timestamp = 1299980101189000

My question is how do I get all values (over time) for this column? I want to see something like get Users[jsmith][first] ==> John (timestamp), Charlie (timestamp).

我的问题是如何获得此列的所有值(随着时间的推移)?我希望看到类似于获取用户[jsmith] [first] ==> John(时间戳),Charlie(时间戳)的内容。

1 个解决方案

#1


7  

You don't. Cassandra departs from the BigTable model here: only the most recent version is retained.

你没有。 Cassandra在这里偏离了BigTable模型:只保留了最新版本。

#1


7  

You don't. Cassandra departs from the BigTable model here: only the most recent version is retained.

你没有。 Cassandra在这里偏离了BigTable模型:只保留了最新版本。