incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Exception while writing compsite column names
Date Thu, 18 Jul 2013 14:11:12 GMT

I have an issue while inserting a composite column name to one of the Cassandra column families.
Below is a detailed description of what I had done and stuck up at.
Please let me know where I had went wrong.

       Rowkey        ->     RowIdString
       Column name   ->     TEXT1 : value1 : TEXT2 : value2 : TEXT3
       Column value ->     value3

Column family definition:
                create column family CompositeColumnNameTest
       WITH comparator='CompositeType(UTF8Type,UTF8Type,UTF8Type,UTF8Type,UTF8Type)'
       AND key_validation_class=UTF8Type
       WITH compression_options={sstable_compression:SnappyCompressor, chunk_length_kb:64};

                String RowIdString = "1234";

       Composite composite = new Composite();
       composite.addComponent("TEXT1", StringSerializer.get());
       composite.addComponent("value1", StringSerializer.get());
       composite.addComponent("TEXT2", StringSerializer.get());
       composite.addComponent("value3", StringSerializer.get());
       composite.addComponent("TEXT3", StringSerializer.get());

       Column column = new Column(composite.serialize());

       // push data to cassandra
       batchMutate.addInsertion(RowIdString, "CompositeColumnNameTest", column);

me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:Not
enough bytes to read value of component 0)
       at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(
       at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(
       at me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(
       at me.prettyprint.cassandra.service.Operation.executeAndSetResult(
       at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(
       at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(

Thanks in advance


The information in this Internet Email is confidential and may be legally privileged. It is
intended solely for the addressee. Access to this Email by anyone else is unauthorized. If
you are not the intended recipient, any disclosure, copying, distribution or any action taken
or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed
to our clients any opinions or advice contained in this Email are subject to the terms and
conditions expressed in any applicable governing The Home Depot terms of business or client
engagement letter. The Home Depot disclaims all responsibility and liability for the accuracy
and content of this attachment and for any damages or losses arising from any inaccuracies,
errors, viruses, e.g., worms, trojan horses, etc., or other items of a destructive nature,
which may be contained in this attachment and shall not be liable for direct, indirect, consequential
or special damages in connection with this e-mail message or its attachment.

View raw message