cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morton <>
Subject Re: Question about column insert history
Date Sun, 08 Aug 2010 21:53:10 GMT
Short answer, you should consider the previous values replaced. 

Longer, they are kept around for a while but are not available outside of cassandra. They
are removed at the next Major compaction, if the change happened more than GCGraceSeconds

If you want to store a history you can always store the data twice, say in one CF for the
current values and one for the history. 


On 09 Aug, 2010,at 08:29 AM, Kevin Cox <> wrote:

Taking from the CassandaraCLI example page for simplicity, one enters the following into the

cassandra> set Keyspace1.Standard2['jsmith']['age'] = '42'

cassandra> get Keyspace1.Standard2['jsmith'] 
=> (column=last, value=Smith, timestamp=1279780450578000)
=> (column=first, value=John, timestamp=1279780434745000)
=> (column=age, value=42, timestamp=1279780457458000)
Returned 3 results.

cassandra> set Keyspace1.Standard2['jsmith']['age'] = '43'
Value inserted.

cassandra> set Keyspace1.Standard2['jsmith']['age'] = '44'
Value inserted.

cassandra> get Keyspace1.Standard2['jsmith'] ['age'] 
=> (column=age, value=44, timestamp=1281297196787000) <<< 44 is the current value

How could I get access to the previous values of the age column? (like values 42 and 43 and
their timestamps that were entered prior to value 44)
Are previous values kept or replaced in Cassandra?
Is there any way to preserve and/or access column history?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
    • Unnamed multipart/related (inline, None, 0 bytes)
View raw message