From user-return-9954-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Mon Oct 18 20:19:20 2010 Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 89614 invoked from network); 18 Oct 2010 20:19:20 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Oct 2010 20:19:20 -0000 Received: (qmail 32705 invoked by uid 500); 18 Oct 2010 20:19:18 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 32679 invoked by uid 500); 18 Oct 2010 20:19:18 -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 32671 invoked by uid 99); 18 Oct 2010 20:19:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Oct 2010 20:19:18 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a57.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Oct 2010 20:19:12 +0000 Received: from homiemail-a57.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a57.g.dreamhost.com (Postfix) with ESMTP id AB4BB208076 for ; Mon, 18 Oct 2010 13:18:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=to:from :subject:date:message-id:content-type:mime-version:in-reply-to; q=dns; s=thelastpickle.com; b=Pkejpj/KY/vw1aKHIoSCvvD8GqXywzsyT rNMxjXFmYrVKO9AdpHoXd3NMx1Q8KPEvE7sC1PVNMtwwh2dbqKPhrNHQXBf/VO9O Sq7XKgd2dOAl5YWAm3Dzx+qrq/sG/m42WPprSazW1tw1pxLTVmay0CeO0FCV00Et 7Kvxe5NlOE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=to :from:subject:date:message-id:content-type:mime-version: in-reply-to; s=thelastpickle.com; bh=yhxAhtOr2H4ZAku5QhGpXnr/e+8 =; b=Nq826w7dwwj3vVlhu83UiHdfwL+QMAP2SLzUsffYtn1kRZsZnFGbkfLKSYX CZ9upnbOOUwg51LpQF/DUrGIERG5qAS+ZnAluCzcCWr45RGn+6DsaVyTE8DvPThM TOMr+OsdlGCffof71Y5tcz8Js4KnESKNzYOM6vhHz9LTaUdw= Received: from localhost (webms.mac.com [17.148.16.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a57.g.dreamhost.com (Postfix) with ESMTPSA id 9A364208060 for ; Mon, 18 Oct 2010 13:18:50 -0700 (PDT) To: cbertu81@libero.it, " "@athena.apache.org From: Aaron Morton Subject: Re: TimeUUID makes me crazy Date: Mon, 18 Oct 2010 20:18:48 GMT X-Mailer: MobileMe Mail (1C3203) Message-id: <3557208c-835e-4c6b-edd7-dc24f8c5c629@me.com> Content-Type: multipart/alternative; boundary=Apple-Webmail-42--4f313b2a-3713-c0cd-f744-a44f2e7c490b MIME-Version: 1.0 In-Reply-To: <9754222.1976481287419128269.JavaMail.defaultUser@defaultHost> --Apple-Webmail-42--4f313b2a-3713-c0cd-f744-a44f2e7c490b Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; format=flowed Whats the call stack for the error and what client you using ?=A0=0AIs the= error client side or server side? Is there an error in the server side lo= g?=0A=0AMy guess is there is something wrong in the way your are creating = the UUID for the colum and super column names, rather than for the key. Yo= u can use UUID for the key as a string (or byte array in 0.7) so a badly f= ormatted value will not matter.=A0=0A=0AAaron=0A=0AOn 19 Oct, 2010,at 05:2= 5 AM, "cbertu81@libero.it" wrote:=0A=0AI am getting c= razy using TimeUUID in cassandra via Java. I've read the FAQ but =0Ait did= n't help.=0ACan I use a TimeUUID as ROW identifier? (if converted to strin= g)=0A=0AI have a CF like this and SCF like these:=0A=0A=0ATIMEUUID OPECID (ROW) {=0Aphone: = 123=0Aaddress: street xyz=0A}=0A=0A=0AString USERID (ROW) {=0ATIMEUUID OPECID (SuperColumnName) {=0A= collection of columns;=0A}=0A}=0A=0AIn one situation the TimeUUID is a ROW= identifier while in another is the =0ASuperColumn name. I get many "UUID = must be a 16 byte" when I try to read a data =0Athat did not give any exce= ption during his save.=0A=0Aat a Time T0 this one works: mutator.writeColu= mns(UuidHelper.timeUuidFromBytes=0A(OpecID).toString(), opecfamily, notNul= l); // (notnull contains a list of =0Acolumns also opecstatus)=0A=0AImmedi= ately after this one raise an exception: selector.getColumnFromRow=0A(Uuid= Helper.timeUuidFromBytes(OpecID).toString(), opecfamily, "opecstatus", =0A= ConsistencyLevel.ONE)=0A=0AI hope that someone help me understanding it ..= =0A=0A --Apple-Webmail-42--4f313b2a-3713-c0cd-f744-a44f2e7c490b Content-Type: multipart/related; type="text/html"; boundary=Apple-Webmail-86--4f313b2a-3713-c0cd-f744-a44f2e7c490b --Apple-Webmail-86--4f313b2a-3713-c0cd-f744-a44f2e7c490b Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1;
Whats the call stack for the error and what client you using ? <= /div>
Is the error client side or server side? Is there an error in th= e server side log?

My guess is there is something= wrong in the way your are creating the UUID for the colum and super colum= n names, rather than for the key. You can use UUID for the key as a string= (or byte array in 0.7) so a badly formatted value will not matter. <= /div>

Aaron

On 19 Oct, 2010,at 05:25 AM, = "cbertu81@libero.it" <cbertu81@libero.it> wrote:

<= blockquote type=3D"cite">
I am getting crazy u= sing TimeUUID in cassandra via Java. I've read the FAQ but
=0Ait didn'= t help.
=0ACan I use a TimeUUID as ROW identifier? (if converted to str= ing)
=0A
=0AI have a CF like this and SCF like these:
=0A
=0A&= lt;ColumnFamily Name=3D"Opecs" CompareWith=3D"TimeUUIDType"/>
=0ATIM= EUUID OPECID (ROW) {
=0A phone: 123
=0A addr= ess: street xyz
=0A}
=0A
=0A<ColumnFamily Name=3D"UserOpecs" C= olumnType=3D"Super" CompareWith=3D"TimeUUIDType"
=0ACompareSubcolumnsW= ith=3D"BytesType" />
=0AString USERID (ROW) {
=0A TIME= UUID OPECID (SuperColumnName) {
=0A col= lection of columns;
=0A }
=0A}
=0A
=0AIn one situa= tion the TimeUUID is a ROW identifier while in another is the
=0ASuper= Column name. I get many "UUID must be a 16 byte" when I try to read a data=
=0Athat did not give any exception during his save.
=0A
=0Aat a= Time T0 this one works: mutator.writeColumns(UuidHelper.timeUuidFromBytes=
=0A(OpecID).toString(), opecfamily, notNull); // (notnull contains a l= ist of
=0Acolumns also opecstatus)
=0A
=0AImmediately after this= one raise an exception: selector.getColumnFromRow
=0A(UuidHelper.timeU= uidFromBytes(OpecID).toString(), opecfamily, "opecstatus",
=0AConsiste= ncyLevel.ONE)
=0A
=0AI hope that someone help me understanding it ..=
=0A
=0A
--Apple-Webmail-86--4f313b2a-3713-c0cd-f744-a44f2e7c490b-- --Apple-Webmail-42--4f313b2a-3713-c0cd-f744-a44f2e7c490b--