> 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