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 7EF389548 for ; Mon, 9 Apr 2012 19:03:04 +0000 (UTC) Received: (qmail 72925 invoked by uid 500); 9 Apr 2012 19:03:02 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 72893 invoked by uid 500); 9 Apr 2012 19:03:02 -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 72885 invoked by uid 99); 9 Apr 2012 19:03:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2012 19:03:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of j.dinata@gmail.com designates 209.85.210.172 as permitted sender) Received: from [209.85.210.172] (HELO mail-iy0-f172.google.com) (209.85.210.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2012 19:02:57 +0000 Received: by iazz13 with SMTP id z13so7530240iaz.31 for ; Mon, 09 Apr 2012 12:02:36 -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; bh=DQZhvrRPQZpsikgD2dniqBZHVm9JWIoM3CR8RaMzERo=; b=oMJ5eUSlSaDklF8fWpk0d8r+3AAmB2/zCcW9iw8mdOARjNCKKXildedP1Gp28gcChf beymiIUd8ljqz048dEX6NzIWS70xV1eo7hbotmtFVpbuiJgM5s8w8G86fqriV7/YXNjE 8LMSXmi8gqq1D30SZNwE8M4yiJc486brPloTJd0xr/w80fBpLJRv8x3bVbr0arrAoeFk syMSSfwGeFW79sSh4QoPC5lHvF8KM1/95Idbqcj4HTa9W3zQNfjvaQEDclXGlImSVzKi N/g3rRhx+mAAWdXcHEwNmrBuBJxUs1q4rAij9O5mCpzGkqTSVI1p4ez+cpz9UIIV3qWP Uk7A== MIME-Version: 1.0 Received: by 10.50.212.97 with SMTP id nj1mr25290igc.65.1333998156866; Mon, 09 Apr 2012 12:02:36 -0700 (PDT) Received: by 10.50.131.137 with HTTP; Mon, 9 Apr 2012 12:02:36 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 Apr 2012 12:02:36 -0700 Message-ID: Subject: Re: issue with composite row key on CassandraStorage pig? From: Janwar Dinata To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=14dae9340d1945637204bd43a63e X-Virus-Checked: Checked by ClamAV on apache.org --14dae9340d1945637204bd43a63e Content-Type: text/plain; charset=UTF-8 Hi Janne, Do you happen to know if support for composite row key is in the pipeline? It seems that you did a patch for composite columns support on CassandraStorage.java. Do you have any pointers for implementing composite row key feature? Thanks. On Mon, Apr 9, 2012 at 11:32 AM, Janne Jalkanen wrote: > > I don't think the Pig code supports Composite *keys* yet. The 1.0.9 code > supports Composite Column Names tho'... > > /Janne > > On Apr 8, 2012, at 06:02 , Janwar Dinata wrote: > > Hi, > > I have a column family that uses DynamicCompositeType for its > keys_validation_class. > When I try to dump the row keys using pig but it fails > with java.lang.ClassCastException: org.apache.pig.data.DataByteArray cannot > be cast to org.apache.pig.data.Tuple > > This is how I create the column family > create column family CompoKey > with > key_validation_class = > 'DynamicCompositeType( > a=>AsciiType, > o=>BooleanType, > b=>BytesType, > e=>DateType, > d=>DoubleType, > f=>FloatType, > i=>IntegerType, > x=>LexicalUUIDType, > l=>LongType, > t=>TimeUUIDType, > s=>UTF8Type, > u=>UUIDType)' and > comparator = > 'DynamicCompositeType( > a=>AsciiType, > o=>BooleanType, > b=>BytesType, > e=>DateType, > d=>DoubleType, > f=>FloatType, > i=>IntegerType, > x=>LexicalUUIDType, > l=>LongType, > t=>TimeUUIDType, > s=>UTF8Type, > u=>UUIDType)' and > default_validation_class = CounterColumnType; > > This is my pig script > rows = LOAD 'cassandra://PigTest/CompoKey' USING CassandraStorage(); > keys = FOREACH rows GENERATE flatten(key); > dump keys; > > I'm on cassandra 1.0.9 and pig 0.9.2. > > Thanks. > > > --14dae9340d1945637204bd43a63e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Janne,

Do you happen to know if support for composite= row key is in the pipeline?

It seems that you did= a patch for composite columns support on CassandraStorage.java.
Do you have any pointers for implementing composite row key feature?
<= div>
Thanks.

On Mon, Apr 9,= 2012 at 11:32 AM, Janne Jalkanen <Janne.Jalkanen@ecyrd.com> wrote:
I don't think the Pig code supports Composite *keys* yet. T= he 1.0.9 code supports Composite Column Names tho'...

/Janne

On Apr 8, 2012, at 0= 6:02 , Janwar Dinata wrote:

Hi,

I have a column family that uses=C2=A0DynamicCompositeT= ype for its keys_validation_class.
When I try to dump the row keys using pig but it fails with=C2=A0java.= lang.ClassCastException: org.apache.pig.data.DataByteArray cannot be cast t= o org.apache.pig.data.Tuple

This is how I create t= he column family
create column family CompoKey
=C2=A0 =C2=A0 =C2=A0 =C2= =A0with
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0key_validation_class = =3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'DynamicComposit= eType(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0a=3D>AsciiType,
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0o=3D>BooleanType,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =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_class =3D CounterColumnType; =C2=A0= =C2=A0

This is my pig script
rows =3D =C2= =A0LOAD 'cassandra://PigTest/CompoKey' USING CassandraStorage();
keys =3D FOREACH rows GENERATE flatten(key);
dump keys;

I'm on=C2=A0cassandra 1.0.9 and=C2=A0pig 0.9.2.

Thanks.


--14dae9340d1945637204bd43a63e--