From user-return-10853-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Dec 01 12:23:36 2010 Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 68501 invoked from network); 1 Dec 2010 12:23:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Dec 2010 12:23:36 -0000 Received: (qmail 21272 invoked by uid 500); 1 Dec 2010 12:23:34 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 21090 invoked by uid 500); 1 Dec 2010 12:23:33 -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 21081 invoked by uid 99); 1 Dec 2010 12:23:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 12:23:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yezhen1984@gmail.com designates 209.85.161.44 as permitted sender) Received: from [209.85.161.44] (HELO mail-fx0-f44.google.com) (209.85.161.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 12:23:25 +0000 Received: by fxm9 with SMTP id 9so5626513fxm.31 for ; Wed, 01 Dec 2010 04:23:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=8zdMbZNGQGYGrNxc+YtVYCVdMZBwBwot5YA9omPZABI=; b=JwsuIUU1qiCFwGYhJgyYB4AgH7h52Y/gDltQXeAG7XU4mm7wuBt2eGbMcPfxn6p4uP sCAVasyvCe337eWwVLOnubsE/onQnxLu5/g2vYYzmJWbL04941QJuGrgDf7No5V2YFu0 /exqHU6XFdRJdZmMIWt9Cibcwr67OjrgC4YFM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=uoMU2gy3cbjP94tz7/OhfWvPkH0e277X3iFf9l3kswENLMRrEDrook149LdRunj2Dh qEBSvIw4Jn/Me5w7HwjjAr2Ep2e9Z2Ghg0Wp7ELKvDfK89634U8RNDX2Ku76c7d39sAc PAaeYrMOLuLBUAm3+qj6JYuNJmM+69lmz+k5Q= MIME-Version: 1.0 Received: by 10.223.97.73 with SMTP id k9mr8193294fan.120.1291206185148; Wed, 01 Dec 2010 04:23:05 -0800 (PST) Received: by 10.223.86.143 with HTTP; Wed, 1 Dec 2010 04:23:04 -0800 (PST) Date: Wed, 1 Dec 2010 20:23:04 +0800 Message-ID: Subject: Is there any way to store muti-version data based on the timestamp? From: zhen ye To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi, dear Guys I did some test to see if cassandra can store muti-version of the same data, but from the below test code seems it only can store one version's data, which is different from HBase. Can somebody help to confirm this? It will be very appreciative if some one are kindly enough to give me a suggestion of how to use cassandra to store muti-version data efficiently. client.insert(keyspace, key1, path, "value1".getBytes(), timestamp1, ConsistencyLevel.ALL); client.insert(keyspace, key1, path, "value2".getBytes(), timestamp2, ConsistencyLevel.ALL); client.remove(keyspace, key1, path, timestamp2, ConsistencyLevel.ALL); ColumnOrSuperColumn column = client.get(keyspace, key1, path, ConsistencyLevel.ALL); System.out.println(new String(column.column.value)); The result is: NotFoundException() at org.apache.cassandra.thrift.Cassandra$get_result.read(Cassandra.java:3639) at org.apache.cassandra.thrift.Cassandra$Client.recv_get(Cassandra.java:344) at org.apache.cassandra.thrift.Cassandra$Client.get(Cassandra.java:319) at ThriftHelloWorld.main(ThriftHelloWorld.java:52)