rantav/hector — Issue #345: BufferUnderflowException in SuperCfResult.getKey()
Author: sherman
Created: 2011-11-15 06:43:27+00:00
State: open

The following code throws Exception:

keys are List, e.g. {1,2}

SuperCfResult results = template.querySuperColumns(keys);
Collection superColumnKeys = results.getSuperColumns();

log.info("Has results: " + results.hasResults()); // true
log.info("Row key is: " + results.getKey()); // exception

java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:480)
at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:336)
at me.prettyprint.cassandra.serializers.IntegerSerializer.fromByteBuffer(IntegerSerializer.java:35)
at me.prettyprint.cassandra.serializers.IntegerSerializer.fromByteBuffer(IntegerSerializer.java:11)
at me.prettyprint.cassandra.service.template.SuperCfResultWrapper.getKey(SuperCfResultWrapper.java:110)

Cassandra configuration:

me.prettyprint
hector-core
1.0-1

org.apache.cassandra
cassandra-thrift
1.0.1

org.apache.thrift
libthrift
0.6.1

Cassandra server 1.0.1 with 2 nodes.