Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 35D19108D6 for ; Wed, 19 Mar 2014 08:54:16 +0000 (UTC) Received: (qmail 24952 invoked by uid 500); 19 Mar 2014 08:54:11 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 24459 invoked by uid 500); 19 Mar 2014 08:54:10 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 24444 invoked by uid 99); 19 Mar 2014 08:54:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2014 08:54:09 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS,T_REMOTE_IMAGE X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of artur.kronenberg@openmarket.com designates 81.187.36.3 as permitted sender) Received: from [81.187.36.3] (HELO puma.mxtelecom.com) (81.187.36.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2014 08:54:04 +0000 Received: from glide.lon.openmarket.com ([10.9.64.115]) by puma.mxtelecom.com with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.80.1) (envelope-from ) id 1WQCFr-0001sK-0I for user@cassandra.apache.org; Wed, 19 Mar 2014 08:53:43 +0000 Message-ID: <53295B16.40605@openmarket.com> Date: Wed, 19 Mar 2014 08:53:42 +0000 From: Artur Kronenberg User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Re: How to extract information from commit log? References: <64e2c65edd65fda0c19efa183c43b295@ufl.edu> In-Reply-To: <64e2c65edd65fda0c19efa183c43b295@ufl.edu> Content-Type: multipart/alternative; boundary="------------020108040803090804010201" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------020108040803090804010201 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, 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: http://grepcode.com/file/repo1.maven.org/maven2/org.apache.cassandra/cassandra-all/1.1.9/org/apache/cassandra/db/commitlog/CommitLogReplayer.java 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 >> --------------020108040803090804010201 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hi,

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: http://grepcode.com/file/repo1.maven.org/maven2/org.apache.cassandra/cassandra-all/1.1.9/org/apache/cassandra/db/commitlog/CommitLogReplayer.java

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 <menghan@ufl.edu> 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

 

 

--------------020108040803090804010201--