Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Composite row key doesn't work for IntegerType component #244
I had a composite row key consisting of LongType:UTF8Type:IntegerType
When iterating through the rows returned from my query, I kept getting an exception complaining that it could not set the "int" in my AnnotatedCompositeSerializer class to null.
I got the source and stepped through the code. The bytebuffer for the column name contains a short length for each component. Here is what mine had:
length: 8 followed by 8 bytes for my long
The problem is that the bytebuffer contained 8 bytes for my long, the correct number of bytes for my string, and only 1 byte for my integer. The value of that 1 byte was correct (it was a 2) but because it was only 1 byte long instead of 4, the code in
in AnnotatedCompositeSerializer returned null and caused the exception.