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 7364C23B for ; Wed, 20 Apr 2011 22:11:43 +0000 (UTC) Received: (qmail 61968 invoked by uid 500); 20 Apr 2011 22:11:41 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 61936 invoked by uid 500); 20 Apr 2011 22:11:41 -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 61928 invoked by uid 99); 20 Apr 2011 22:11:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2011 22:11:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of brailateo@gmail.com designates 209.85.214.44 as permitted sender) Received: from [209.85.214.44] (HELO mail-bw0-f44.google.com) (209.85.214.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2011 22:11:33 +0000 Received: by bwz13 with SMTP id 13so1127556bwz.31 for ; Wed, 20 Apr 2011 15:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=Pk4/bLVuC8yvY73LGn8nzNd0lO8vbZ8j/8Y11N6Wi6Q=; b=uwLF43MEVxcCeQdamsDejF7+v02Gn2fEOSsDgeAwkZvT4f3IDrjMxZ2dfdKHq5XfXL E16QfJs2ozXwWxpkrYCUHn3csMzVnU9zrqlh0WEI4sspcKbseHutj827+tz6YhGBJdUN zbpPscaKDRLYSjqybAyVqQ93j91FE4ALw5FdA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=BZFNRWoixh5b6vcmqIiF1yC4qAGGS4MRyhg5hhzFnHaFEGbu4W1XavToW8VRyDMIo3 3eqn1A4UbRI8PC6+MQMLn2LeFsErAUsG3XntPD/tk15iAnE2BbImsuQt1eGxieM38ygI QLgoiuFTSaW4dDTUUcCfp5eDQIycDjBff/H3E= Received: by 10.204.126.152 with SMTP id c24mr417491bks.4.1303337473160; Wed, 20 Apr 2011 15:11:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.51.20 with HTTP; Wed, 20 Apr 2011 15:10:53 -0700 (PDT) From: Constantin Teodorescu Date: Thu, 21 Apr 2011 01:10:53 +0300 Message-ID: Subject: Cannot find row when using 3 indices for search, able to find it using only 2 To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e6dab05e1c353d04a160e78d X-Virus-Checked: Checked by ClamAV on apache.org --0016e6dab05e1c353d04a160e78d Content-Type: text/plain; charset=ISO-8859-1 Cassandra 0.7.4 on 4 nodes Linux Ubuntu 10.10 i386 , 32 bit root@bigcouch-106:/etc/cassandra# nodetool -h 172.16.1.106 ring Address Status State Load Owns Token 172.16.1.104 Up Normal 1.8 GB 22.33% 4778396862879243066278530647513341098 172.16.1.8 Up Normal 1.48 GB 28.12% 52627163731801348483758292043565262417 172.16.1.106 Up Normal 1.21 GB 27.22% 98934176951395683802275136006692518904 172.16.1.110 Up Normal 1.12 GB 22.33% 136934291168078629024171054299313117062 I am using keyspace 'bnd' , columnfamily 'pet' described as update column family pet with column_metadata = [ {column_name: P_cui, validation_class:UTF8Type, index_type: KEYS}, {column_name: P_nume, validation_class:UTF8Type, index_type: KEYS}, {column_name: P_prenume, validation_class:UTF8Type, index_type: KEYS} ]; Trying to find a row using 2 indices (P_cui and P_prenume) works: [default@bnd] get pet where P_cui='1670518330770' and P_prenume='CONSTANTIN'; ------------------- RowKey: RO1492360605 => (column=A1RO354000086663, value=313a463a323030332d30342d30313a32333730, timestamp=1303181522507175) => (column=P_adresa, value=4c4954454e49, timestamp=1303181522507175) => (column=P_cui, value=1670518330770, timestamp=1303181522507175) => (column=P_nume, value=Manoliu, timestamp=1303181522507175) => (column=P_prenume, value=CONSTANTIN, timestamp=1303181522507175) => (column=P_tip, value=36, timestamp=1303253832349129) 1 Row Returned. I am able to find it using the other 2 indices (P_prenume and P_nume) works fine: [default@bnd] get pet where P_prenume='CONSTANTIN' and P_nume='Manoliu'; ------------------- RowKey: RO1492360605 => (column=A1RO354000086663, value=313a463a323030332d30342d30313a32333730, timestamp=1303181522507175) => (column=P_adresa, value=4c4954454e49, timestamp=1303181522507175) => (column=P_cui, value=1670518330770, timestamp=1303181522507175) => (column=P_nume, value=Manoliu, timestamp=1303181522507175) => (column=P_prenume, value=CONSTANTIN, timestamp=1303181522507175) => (column=P_tip, value=36, timestamp=1303253832349129) 1 Row Returned. -------------------------------------------------------------------------------------------------- Trying to find the same row using 3 indices not working: [default@bnd] get pet where P_cui='1670518330770' and P_prenume='CONSTANTIN' and P_nume='Manoliu'; 0 Row Returned. Any clues? Teo --0016e6dab05e1c353d04a160e78d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cassandra 0.7.4 on 4 nodes Linux Ubuntu 10.10 i386 , 32 bit

root@bigcouch-106:/etc/cassandra# nodetool -h 172.16.1.106 ring
Address =A0 =A0 =A0 =A0 Status State =A0 Load =A0 =A0 =A0 =A0 =A0 =A0Owns= =A0 =A0Token =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0=A0
172.16.1.104 =A0 =A0Up =A0 =A0 Normal =A01.8 GB =A0 =A0 =A0 =A0 =A022.= 33% =A04778396862879243066278530647513341098 =A0 =A0 =A0=A0
172.1= 6.1.8 =A0 =A0 =A0 Up =A0 =A0 Normal =A01.48 GB =A0 =A0 =A0 =A0 28.12% =A052= 627163731801348483758292043565262417 =A0 =A0 =A0
172.16.1.106 =A0 =A0Up =A0 =A0 Normal =A01.21 GB =A0 =A0 =A0 =A0 27.22= % =A098934176951395683802275136006692518904 =A0 =A0 =A0
172.16.1.= 110 =A0 =A0Up =A0 =A0 Normal =A01.12 GB =A0 =A0 =A0 =A0 22.33% =A0136934291= 168078629024171054299313117062=A0

I am using keyspace 'bnd' , columnfamily 'p= et' described as

update column family pet= with column_metadata =3D [
=A0=A0{column_name: P_cui, =A0 =A0 = =A0 =A0 =A0validation_class:UTF8Type, index_type: KEYS},
=A0=A0{column_name: P_nume, =A0 =A0 =A0validation_class:UTF8Type, inde= x_type: KEYS},
=A0=A0{column_name: P_prenume, validation_class:UT= F8Type, index_type: KEYS}
];

Tryin= g to find a row using 2 indices (P_cui and P_prenume) works:
[default@bnd] get pet where P_cui=3D'1670518330770' and P= _prenume=3D'CONSTANTIN';
-------------------
Ro= wKey: RO1492360605
=3D> (column=3DA1RO354000086663, value=3D31= 3a463a323030332d30342d30313a32333730, timestamp=3D1303181522507175)
=3D> (column=3DP_adresa, value=3D4c4954454e49, timestamp=3D13031815= 22507175)
=3D> (column=3DP_cui, value=3D1670518330770, timesta= mp=3D1303181522507175)
=3D> (column=3DP_nume, value=3DManoliu,= timestamp=3D1303181522507175)
=3D> (column=3DP_prenume, value=3DCONSTANTIN, timestamp=3D130318152= 2507175)
=3D> (column=3DP_tip, value=3D36, timestamp=3D1303253= 832349129)

1 Row Returned.

I am able to find it using the other 2 indices (P_prenume and P_num= e) works fine:
[default@bnd] get pet where P_prenume=3D'CONSTANTIN' and = P_nume=3D'Manoliu';=A0
-------------------
RowK= ey: RO1492360605
=3D> (column=3DA1RO354000086663, value=3D313a= 463a323030332d30342d30313a32333730, timestamp=3D1303181522507175)
=3D> (column=3DP_adresa, value=3D4c4954454e49, timestamp=3D13031815= 22507175)
=3D> (column=3DP_cui, value=3D1670518330770, timesta= mp=3D1303181522507175)
=3D> (column=3DP_nume, value=3DManoliu,= timestamp=3D1303181522507175)
=3D> (column=3DP_prenume, value=3DCONSTANTIN, timestamp=3D130318152= 2507175)
=3D> (column=3DP_tip, value=3D36, timestamp=3D1303253= 832349129)

1 Row Returned.

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

Trying to find the same row using 3 indices not working= :
[default@bnd] get pet where P_cui=3D'1670518330770'= ; and P_prenume=3D'CONSTANTIN' and P_nume=3D'Manoliu';

0 Row Returned.

Any clues?
Teo

--0016e6dab05e1c353d04a160e78d--