cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janwar Dinata <j.din...@gmail.com>
Subject issue with composite row key on CassandraStorage pig?
Date Sun, 08 Apr 2012 03:02:17 GMT
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