cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peer, Oded" <>
Subject sstable writer and creating bytebuffers
Date Mon, 30 Mar 2015 10:38:25 GMT
I am writing code to bulk load data into Cassandra using SSTableSimpleUnsortedWriter
I changed my partition key from a composite key (long, int) to a single column key (long).
For creating the composite key I used a CompositeType, and I kept using it after changing
the key to a single column.
My code didn't work until I changed the way I create the ByteBuffer not to use CompositeType.

The following code prints 'false'.
Do you consider this a bug?

              long val = 123L;
              ByteBuffer direct = bytes( val );
              ByteBuffer composite = CompositeType.getInstance( LongType.instance ).builder().add(
bytes( val ) ).build();
              System.out.println( direct.equals( composite ) );

View raw message