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 248AFC3B1 for ; Wed, 16 May 2012 14:16:56 +0000 (UTC) Received: (qmail 92907 invoked by uid 500); 16 May 2012 14:16:53 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 92792 invoked by uid 500); 16 May 2012 14:16:53 -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 92784 invoked by uid 99); 16 May 2012 14:16:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2012 14:16:53 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of felipefsch@gmail.com designates 209.85.213.44 as permitted sender) Received: from [209.85.213.44] (HELO mail-yw0-f44.google.com) (209.85.213.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2012 14:16:47 +0000 Received: by yhq56 with SMTP id 56so931869yhq.31 for ; Wed, 16 May 2012 07:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=y7NjbEj7FpG5MyEazFQdgXrxszgIrpcZ3Klu1a5GGEo=; b=RRWZ7EdlUjfO4ZU51/tZrYt29jyRXfgiyfHU3pInS/sUoSBz5ZcZgM0OvaIVxR4gHV HV0PmIc9eOY9QVmQByvx4gNTrqZKTAR4w9pcojcPG8S18uJzGW5wjHk3SRkjGpg1XmHW fZAlLDhwrGKfnbeyXAsMY2/FvK1UftL1pGgWjkUjAoyTguqWuWzxcLgYLCkd63I4ZgSo LfGe8qy4GIvVwFOtjNOWqi3dWKVNmxUi+x+ac6esFAU3flObrmkqV62uZu93Rbi0qRr2 7rE0oOF9dY6KGO6aY4i6As2OwjSZ1AeCqGh2VDAJD0V742X4AN6VOe26SHN8yTDtTCXW oVjQ== MIME-Version: 1.0 Received: by 10.236.180.40 with SMTP id i28mr3662722yhm.22.1337177786526; Wed, 16 May 2012 07:16:26 -0700 (PDT) Received: by 10.146.158.2 with HTTP; Wed, 16 May 2012 07:16:26 -0700 (PDT) In-Reply-To: References: <201205141035386232944@software.ict.ac.cn> Date: Wed, 16 May 2012 16:16:26 +0200 Message-ID: Subject: Re: Retrieving old data version for a given row From: Felipe Schmidt To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable That was very helpfull, thank you very much! I still have some questions: -it is possible to make Cassandra keep old value data after flushing? The same question for the memTable, before flushing. Seems to me that when I update some tuple, the old data will be overwrited in memTable, even before flushing. -it is possible to scan values from the memtable, maybe using the so-called Thrift API? Using the client-api I can just see the newest data version, I can't see what's really happening with the memTable. I ask that cause what I'll try to do is a Change Data Capture to Cassandra and the answers will define what kind of aproaches I'm able to use. Thanks in advance. Regards, Felipe Mathias Schmidt (Computer Science UFRGS, RS, Brazil) 2012/5/14 aaron morton : > Cassandra does not provide access to multiple versions of the same column= . > It is essentially implementation detail. > > All mutations are written to the commit log in a binary format, see the > o.a.c.db.RowMutation.getSerializedBuffer() (If you want to tail it for > analysis you may want to change=A0commitlog_sync in cassandra.yaml) > > Here is post about looking at multiple versions columns in an > sstable=A0http://thelastpickle.com/2011/05/15/Deletes-and-Tombstones/ > > Remember that not all "versions" of a column are written to disk > =A0(see=A0http://thelastpickle.com/2011/04/28/Forces-of-Write-and-Read/).= =A0Also > compaction will compress multiple versions of the same column from multip= le > files into a single version in a single file . > > Hope that helps. > > > ----------------- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > > On 14/05/2012, at 9:50 PM, Felipe Schmidt wrote: > > Yes, I need this information just for academic purposes. > > So, to read old data values, I tried to open the Commitlog using tail > -f and also the log files viewer of Ubuntu, but I can not see many > informations inside of the log! > Is there any other way to open this log? I didn't find any Cassandra > API for this purpose. > > Thanks averybody in advance. > > Regards, > Felipe Mathias Schmidt > (Computer Science UFRGS, RS, Brazil) > > > > > 2012/5/14 zhangcheng2 : > > After compaciton, the old version data will gone! > > > ________________________________ > > zhangcheng2 > > > From:=A0Felipe Schmidt > > Date:=A02012-05-14=A005:33 > > To:=A0user > > Subject:=A0Retrieving old data version for a given row > > I'm=A0trying=A0to=A0retrieve=A0old=A0data=A0version=A0for=A0some=A0row=A0= but=A0it=A0seems=A0not > > be=A0possible.=A0I'm=A0a=A0beginner=A0=A0with=A0Cassandra=A0and=A0the=A0u= nique=A0aproach=A0I > > know=A0is=A0looking=A0to=A0the=A0SSTable=A0in=A0the=A0storage=A0folder,= =A0but=A0if=A0I=A0insert > > some=A0column=A0and=A0right=A0after=A0insert=A0another=A0value=A0to=A0the= =A0same=A0row, > > after=A0flushing,=A0I=A0only=A0get=A0the=A0last=A0value. > > Is=A0there=A0any=A0way=A0to=A0get=A0the=A0old=A0data=A0version?=A0Obvious= ly,=A0before=A0compaction. > > > Regards, > > Felipe=A0Mathias=A0Schmidt > > (Computer=A0Science=A0UFRGS,=A0RS,=A0Brazil) > > >