cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artur Kronenberg <>
Subject Re: How to extract information from commit log?
Date Wed, 19 Mar 2014 08:53:42 GMT

we did something similar. We did utilize some cassandra code though and 
wrote a custom commitlog reader that outputs our data into a readable form.

You can look here:

This code is used to replay commitlogs when starting up cassandra. It 
has the ability to deserialize and transform the data into what you'll need.

-- artur

On 18/03/14 19:32, Han,Meng wrote:
> Hi Jonathan,
> Thank you for the timely reply. I am doing this experiment on a 
> continuous basis. To be more specific, I will issue a large amount of 
> read and write operations to a particular key in a short time 
> interval. I'd like to know the order that write operations happens at 
> each replica. TImestamps definitely help to determine order, but the 
> WRITETIME and SStable2Json both looks me only return the timestamps 
> when that key was updated the moment the WRITETIME/SStable2Json is 
> issued. It looks like a one time thing to me. Or put in another way, 
> if I want to get the write time for all write operations in that short 
> invertal to determine a total order for write on that replia I have to 
> constantly issue WRITETIME to this replica?  Correct me if I am wrong 
> here.
> Light me up pleeeeeeeeeease!
> On Tue, 18 Mar 2014 15:05:07 -0400, Jonathan Lacefield wrote:
>> Hello,
>>   Is this a one time investigative item or are you looking to set 
>> something up to do this continuously?  Don't recommend trying to read 
>> the commit log.
>>   You can always use the WRITETIME function in CQL or look within 
>> SSTables via the SStable2Json utility to see write times for 
>> particular versions of partitions.
>> Jonathan
>> Jonathan Lacefield
>> Solutions Architect, DataStax
>> (404) 822 3487
>> <>
>> <>
>> On Tue, Mar 18, 2014 at 2:25 PM, Han,Meng < 
>> <>> wrote:
>>     Hi Cassandra hackers!
>>     I have a question regarding extracting useful information from
>>     commit log.
>>     Since its a binary log, how should I extract information such as
>>     timestamp, values from it? Does anyone know any binary log reader
>>     that I can use directly to read commit log?
>>     If there is no such reader, could someone give me some advice hwo
>>     I can wrote such a reader?
>>     Particularly, I want to know the order that write operations
>>     happens at each replica(cassandra server node) along with their
>>     timestamps, Does anyone know other methods how I can get this
>>     information without instrumenting Cassandra code?
>>     Any help is appreciated!
>>     Cheers,
>>     Meng

View raw message