My table has a composite key (let say, two ascii elements), and I am trying to use batch_mutate for the bulk load.
The argument for the method, mutation_map, is a map where the key is the key to the column family. Since my key is composite, I created it by concatenating ByteBuffer representations of the two components.
When i am trying to execute the batch_mutate method, I am getting exception:
Exception in thread "main" InvalidRequestException(why:Not enough bytes to read value of component 0)
at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:20253)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:922)
at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:908)
at com.moon.cassandra.CassandraAccess.executeBatch(CassandraAccess.java:256)
at com.moon.cql.BatchTest.main(BatchTest.java:40)
What does this mean?
What am I doing wrong? Is it even possible to have composite key and use batch_mutate?
Thanks,
Leonid
