cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Yaskevich (Commented) (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-3886) Pig can't store some types after loading them
Date Fri, 10 Feb 2012 17:48:59 GMT


Pavel Yaskevich commented on CASSANDRA-3886:

I think we should make objToBB method uniform and return in each case e.g.

private ByteBuffer objToBB(Object o)
    if (o == null)
        return (ByteBuffer)o;
    if (o instanceof java.lang.String)
        return new DataByteArray((String)o);
    if (o instanceof Integer)
        return IntegerType.instance.decompose((BigInteger)o);
    if (o instanceof Long)
        return LongType.instance.decompose((Long)o);
    if (o instanceof Float)
        return FloatType.instance.decompose((Float)o);
    if (o instanceof Double)
        return DoubleType.instance.decompose((Double)o);
    if (o instanceof UUID)
        return ByteBuffer.wrap(UUIDGen.decompose((UUID) o));
    return null;
> Pig can't store some types after loading them
> ---------------------------------------------
>                 Key: CASSANDRA-3886
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 0.8.7
>            Reporter: Brandon Williams
>            Assignee: Brandon Williams
>             Fix For: 1.0.8
>         Attachments: 3886.txt
> In CASSANDRA-2810, we removed the decompose methods in putNext instead relying on objToBB,
however it cannot sufficiently handle all types.  For instance, if longs are loaded and then
an attempt to store them is made, this causes a cast exception:
java.lang.ClassCastException: java.lang.Long cannot be cast to
Output must be (key, {(column,value)...}) for ColumnFamily or (key, {supercolumn:{(column,value)...}...})
for SuperColumnFamily

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message