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 3C5B141B7 for ; Tue, 21 Jun 2011 06:36:45 +0000 (UTC) Received: (qmail 74425 invoked by uid 500); 21 Jun 2011 06:36:43 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 73725 invoked by uid 500); 21 Jun 2011 06:36:34 -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 73716 invoked by uid 99); 21 Jun 2011 06:36:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 06:36:33 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [203.199.18.82] (HELO mail1.impetus.co.in) (203.199.18.82) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2011 06:36:27 +0000 Received: from MAIL2.impetus.co.in (192.168.100.8) by mail1.impetus.co.in (192.168.100.28) with Microsoft SMTP Server (TLS) id 14.1.289.1; Tue, 21 Jun 2011 12:06:04 +0530 Received: from mail1.impetus.co.in ([fe80::4c95:4ec3:183e:2d3]) by Mail2.impetus.co.in ([::1]) with mapi id 14.01.0289.001; Tue, 21 Jun 2011 12:06:03 +0530 From: Vivek Mishra To: "user@cassandra.apache.org" Subject: issue with querying SuperColumn Thread-Topic: issue with querying SuperColumn Thread-Index: Acwv3IK3nhJs8gbhTrqKsIm7x1C1kQ== Date: Tue, 21 Jun 2011 06:36:03 +0000 Message-ID: <557E5EDB02B4C8459878EF1EC723AD281E2DF470@mail1.impetus.co.in> Accept-Language: en-GB, en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.145.58] Content-Type: multipart/alternative; boundary="_000_557E5EDB02B4C8459878EF1EC723AD281E2DF470mail1impetuscoi_" MIME-Version: 1.0 --_000_557E5EDB02B4C8459878EF1EC723AD281E2DF470mail1impetuscoi_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I am facing one issue with querying superColumn using clien.get() API. Alth= ough it is working when I try it for a ColumnFamily(rather than SuperColumn= Family). It is working for: ColumnFamily: users Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type Default column value validator: org.apache.cassandra.db.marshal.Bytes= Type Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type Row cache size / save period in seconds: 0.0/0 Key cache size / save period in seconds: 200000.0/14400 Memtable thresholds: 0.2953125/63/1440 (millions of ops/MB/minutes) GC grace seconds: 864000 Compaction min/max thresholds: 4/32 Read repair chance: 1.0 Replicate on write: false Built indexes: [] Issuing list of users(using Cassandra-cli): [default@key1] list users; Using default limit of 100 ------------------- RowKey: 1 =3D> (column=3Dname, value=3D74657374, timestamp=3D1308637325517000) Java code: String key=3D"1"; ColumnPath columnPath =3D new ColumnPath("users"); columnPath.setColumn("name".getBytes()); ColumnOrSuperColumn colName =3D cassndraClient.get(java.nio.Byt= eBuffer.wrap(key.getBytes()), columnPath , ConsistencyLevel.ONE); Column col =3D colName.getColumn(); System.out.println(new String(col.getValue(), "UTF-8")); RESULT: I am getting "test" printed. BUT when I tried it for Super column family "SuperCli" : ColumnFamily: SuperCli (Super) Key Validation Class: org.apache.cassandra.db.marshal.BytesType Default column value validator: org.apache.cassandra.db.marshal.Bytes= Type Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type/org.apach= e.cassandra.db.marshal.UTF8Type Row cache size / save period in seconds: 0.0/0 Key cache size / save period in seconds: 200000.0/14400 Memtable thresholds: 0.2953125/63/1440 (millions of ops/MB/minutes) GC grace seconds: 864000 Compaction min/max thresholds: 4/32 Read repair chance: 1.0 Replicate on write: false Built indexes: [] [default@key1] list SuperCli; Using default limit of 100 ------------------- RowKey: 31 =3D> (super_column=3Daddress, (column=3Dcity, value=3D6e6f696461, timestamp=3D1308296234977000)) =3D> (super_column=3Daddress1, (column=3Dcity, value=3D476e6f696461, timestamp=3D1308296283221000)) =3D> (super_column=3Daddress2, (column=3Dcity, value=3D476e6f696461, timestamp=3D1308296401951000)) 1 Row Returned. Java Code: ColumnPath columnPath =3D new ColumnPath("SuperCli"); columnPath.setSuper_column("address".getBytes()); String key=3D"31"; cassndraClient.get(java.nio.ByteBuffer.wrap(key.getBytes()), co= lumnPath , ConsistencyLevel.ONE); I am getting exception: NotFoundException() at org.apache.cassandra.thrift.Cassandra$get_result.read(Cassandra.jav= a:6418) at org.apache.cassandra.thrift.Cassandra$Client.recv_get(Cassandra.jav= a:519) at org.apache.cassandra.thrift.Cassandra$Client.get(Cassandra.java:492= ) at CasQuery.main(CasQuery.java:112) Any idea about this issue? --Vivek ________________________________ Write to us for a Free Gold Pass to the Cloud Computing Expo, NYC to attend= a live session by Head of Impetus Labs on 'Secrets of Building a Cloud Ven= dor Agnostic PetaByte Scale Real-time Secure Web Application on the Cloud '= . Looking to leverage the Cloud for your Big Data Strategy ? Attend Impetus w= ebinar on May 27 by registering at http://www.impetus.com/webinar?eventid= =3D42 . NOTE: This message may contain information that is confidential, proprietar= y, privileged or otherwise protected by law. The message is intended solely= for the named addressee. If received in error, please destroy and notify t= he sender. Any use of this email is prohibited when received in error. Impe= tus does not represent, warrant and/or guarantee, that the integrity of thi= s communication has been maintained nor that the communication is free of e= rrors, virus, interception or interference. --_000_557E5EDB02B4C8459878EF1EC723AD281E2DF470mail1impetuscoi_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

 

 

I am facing one issue with querying superColumn usin= g clien.get() API. Although it is working when I try it for a ColumnFamily(= rather than SuperColumnFamily).

 

It is working for:

&nbs= p;   ColumnFamily: users

&nbs= p;     Key Validation Class: org.apache.cassandra.db.ma= rshal.UTF8Type

&nbs= p;     Default column value validator: org.apache.cassa= ndra.db.marshal.BytesType

&nbs= p;     Columns sorted by: org.apache.cassandra.db.marsh= al.UTF8Type

&nbs= p;     Row cache size / save period in seconds: 0.0/0

&nbs= p;     Key cache size / save period in seconds: 200000.= 0/14400

&nbs= p;     Memtable thresholds: 0.2953125/63/1440 (millions= of ops/MB/minutes)

&nbs= p;    GC grace seconds: 864000

&nbs= p;     Compaction min/max thresholds: 4/32

&nbs= p;     Read repair chance: 1.0

&nbs= p;     Replicate on write: false

&nbs= p;     Built indexes: []

&nbs= p;

Issu= ing list of users(using Cassandra-cli):

&nbs= p;

[def= ault@key1] list users;

Usin= g default limit of 100

----= ---------------

RowK= ey: 1

=3D&= gt; (column=3Dname, value=3D74657374, timestamp=3D1308637325517000)<= /p>

 

 

Java code:

String key=3D<= /span>"1";

  &n= bsp;         ColumnPath columnPath = =3D new ColumnPath(&quo= t;users");

  &n= bsp;         columnPath.setColumn(<= /span>"name".getBytes());

  &n= bsp;         ColumnOrSuperColumn co= lName =3D cassndraClient.get(java.nio.ByteBuffer.wrap(key.getBytes()= ), columnPath , ConsistencyLevel.ONE= );

  &n= bsp;         Column col =3D colName= .getColumn();

       &n= bsp;    System.out.pr= intln(new String(col.getValue(), "UTF-8"))= ;

 

 

RESULT: I am getting “test” printed.

 

BUT when I tried it for Super column family = “SuperCli” :

 

&nbs= p;   ColumnFamily: SuperCli (Super)

&nbs= p;     Key Validation Class: org.apache.cassandra.db.ma= rshal.BytesType

&nbs= p;     Default column value validator: org.apache.cassa= ndra.db.marshal.BytesType

&nbs= p;     Columns sorted by: org.apache.cassandra.db.marsh= al.UTF8Type/org.apache.cassandra.db.marshal.UTF8Type

&nbs= p;     Row cache size / save period in seconds: 0.0/0

&nbs= p;     Key cache size / save period in seconds: 200000.= 0/14400

&nbs= p;     Memtable thresholds: 0.2953125/63/1440 (millions= of ops/MB/minutes)

&nbs= p;     GC grace seconds: 864000

&nbs= p;     Compaction min/max thresholds: 4/32

&nbs= p;     Read repair chance: 1.0

&nbs= p;     Replicate on write: false

&nbs= p;     Built indexes: []

&nbs= p;

[def= ault@key1] list SuperCli;

Usin= g default limit of 100

----= ---------------

RowK= ey: 31

=3D&= gt; (super_column=3Daddress,

&nbs= p;    (column=3Dcity, value=3D6e6f696461, timestamp=3D130829= 6234977000))

=3D&= gt; (super_column=3Daddress1,

&nbs= p;    (column=3Dcity, value=3D476e6f696461, timestamp=3D1308= 296283221000))

=3D&= gt; (super_column=3Daddress2,

&nbs= p;    (column=3Dcity, value=3D476e6f696461, timestamp=3D1308= 296401951000))

&nbs= p;

1 Ro= w Returned.

&nbs= p;

&nbs= p;

Java= Code:

&nbs= p;

ColumnPath columnPath =3D new ColumnPath(&quo= t;SuperCli");

  &n= bsp;         columnPath.setSuper_co= lumn("address".getBytes());

  &n= bsp;         String key=3D&quo= t;31";

       &n= bsp;    cassndraClient.get(java.nio.ByteBuffer.wrap(k= ey.getBytes()), columnPath , ConsistencyLevel.ONE);

 

 

I am getting exception:

 

NotFoundExceptio= n()

  &nbs= p;  at org.apache.cassandra.thrift.Cassandra$get_result.read(Cassandra.java:6418)

  &nbs= p;  at org.apache.cassandra.thrift.Cassandra$Client.recv_get(Cassandra.java:519)

  &nbs= p;  at org.apache.cassandra.thrift.Cassandra$Client.get(Cassandra.java:492)

     at CasQuery.main(CasQuery.java:112)

 

 

 

 

Any idea about this issue?

 

 

--Vivek




Write to us for a Free Gold Pass to the Cloud Computing Expo, NYC to attend= a live session by Head of Impetus Labs on ‘Secrets of Building a Clo= ud Vendor Agnostic PetaByte Scale Real-time Secure Web Application on the C= loud ‘.

Looking to leverage the Cloud for your Big Data Strategy ? Attend Impetus w= ebinar on May 27 by registering at http://www.impetus.com/webinar?eventid= =3D42 .


NOTE: This message may contain information that is confidential, proprietar= y, privileged or otherwise protected by law. The message is intended solely= for the named addressee. If received in error, please destroy and notify t= he sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant = and/or guarantee, that the integrity of this communication has been maintai= ned nor that the communication is free of errors, virus, interception or in= terference.
--_000_557E5EDB02B4C8459878EF1EC723AD281E2DF470mail1impetuscoi_--