incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janne Jalkanen <Janne.Jalka...@ecyrd.com>
Subject Re: issue with composite row key on CassandraStorage pig?
Date Mon, 09 Apr 2012 18:32:54 GMT

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