cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janwar Dinata <j.din...@gmail.com>
Subject Re: issue with composite row key on CassandraStorage pig?
Date Mon, 09 Apr 2012 19:02:36 GMT
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 <Janne.Jalkanen@ecyrd.com>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.
>
>
>

Mime
View raw message