You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Mayank Mishra <ma...@gmail.com> on 2010/12/30 13:31:02 UTC
Unable to integrate Cassandra with Hadoop
Hi,
I am trying to integrate Cassandra with Hadoop. I tried with Cassandra 0.7
rc3 trunk, but failed to do so with following exception,
*java.lang.ClassCastException: [B cannot be cast to java.nio.ByteBuffer
at
org.apache.cassandra.db.marshal.BytesType.compare(BytesType.java:29)*
I tried with another branch [1] of Cassandra 0.7 rc3
But it failed with following exception,
java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to [B
My mapper looks like,
MyMapper extends Mapper<ByteBuffer, SortedMap<ByteBuffer, IColumn>, Text,
FloatWritable>
Can some one help me to resolve this issue.
With regards,
Mayank
[1]. http://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7
Re: Unable to integrate Cassandra with Hadoop
Posted by Peter Schuller <pe...@infidyne.com>.
> I am trying to integrate Cassandra with Hadoop. I tried with Cassandra 0.7
> rc3 trunk, but failed to do so with following exception,
>
> java.lang.ClassCastException: [B cannot be cast to java.nio.ByteBuffer
> at
> org.apache.cassandra.db.marshal.BytesType.compare(BytesType.java:29)
>
> I tried with another branch [1] of Cassandra 0.7 rc3
> But it failed with following exception,
> java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to [B
Sounds like a thrift or API version mismatch somewhere. Cassandra
recently switched to thrift 0.5, which uses java.nio.ByteBuffer
instead of byte[]. This would affect the thrift API and some internal
stuff in Cassandra. Likely whatever code is passing a byte[] needs to
be updated.
(I haven't used the hadoop support though so I'm not sure what the
culprit is specifically. Perhaps someone can fill in.)
--
/ Peter Schuller