You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "cristina rodriguez ramos (JIRA)" <ji...@apache.org> on 2012/11/26 13:11:00 UTC

[jira] [Comment Edited] (CASSANDRA-4985) InvalidRequestException(why:Not enough bytes to read value of component 0)

    [ https://issues.apache.org/jira/browse/CASSANDRA-4985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503747#comment-13503747 ] 

cristina rodriguez ramos edited comment on CASSANDRA-4985 at 11/26/12 12:10 PM:
--------------------------------------------------------------------------------

I´m using cassandra 1.1.6 and i am using cql3.
I change the model using this https://github.com/amorton/wdcnz-2012-site/blob/master/cassandra-schema.txt

CREATE COLUMN FAMILY
    Relationships
WITH
    key_validation_class = 'CompositeType(UTF8Type, UTF8Type)'
AND
    comparator = UTF8Type
AND
    default_validation_class = IntegerType
;

And know i have the same error with client.get and client.get_slice
InvalidRequestException(why:Not enough bytes to read value of component 0)
	at org.apache.cassandra.thrift.Cassandra$get_result.read(Cassandra.java:6014)
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
	at org.apache.cassandra.thrift.Cassandra$Client.recv_get(Cassandra.java:514)
	at org.apache.cassandra.thrift.Cassandra$Client.get(Cassandra.java:499)
	at ThirftGet.main(ThirftGet.java:60)
Exception in thread "main" InvalidRequestException(why:Not enough bytes to read value of component 0)
	at org.apache.cassandra.thrift.Cassandra$get_slice_result.read(Cassandra.java:7280)
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
	at org.apache.cassandra.thrift.Cassandra$Client.recv_get_slice(Cassandra.java:552)
	at org.apache.cassandra.thrift.Cassandra$Client.get_slice(Cassandra.java:536)
	at ThirftGet.main(ThirftGet.java:77)

Any clue? how will you do it?

                
      was (Author: cristinarr):
    I´m using cassandra 1.1.6 and i am using cql3.
I change the model using this https://github.com/amorton/wdcnz-2012-site/blob/master/cassandra-schema.txt

CREATE COLUMN FAMILY
    Relationships
WITH
    key_validation_class = 'CompositeType(UTF8Type, UTF8Type)'
AND
    comparator = UTF8Type
AND
    default_validation_class = IntegerType
;

And know i have the same error with client.get and client.get_slice
InvalidRequestException(why:Not enough bytes to read value of component 0)
	at org.apache.cassandra.thrift.Cassandra$get_result.read(Cassandra.java:6014)
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
	at org.apache.cassandra.thrift.Cassandra$Client.recv_get(Cassandra.java:514)
	at org.apache.cassandra.thrift.Cassandra$Client.get(Cassandra.java:499)
	at ThirftGet.main(ThirftGet.java:60)
Exception in thread "main" InvalidRequestException(why:Not enough bytes to read value of component 0)
	at org.apache.cassandra.thrift.Cassandra$get_slice_result.read(Cassandra.java:7280)
	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
	at org.apache.cassandra.thrift.Cassandra$Client.recv_get_slice(Cassandra.java:552)
	at org.apache.cassandra.thrift.Cassandra$Client.get_slice(Cassandra.java:536)
	at ThirftGet.main(ThirftGet.java:77)

Any clue? how will you do it?

                  
> InvalidRequestException(why:Not enough bytes to read value of component 0)
> --------------------------------------------------------------------------
>
>                 Key: CASSANDRA-4985
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4985
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: cristina rodriguez ramos
>
> This is my keyspace with composite rowkey;
> create column family CountryStateCity
>   with column_type = 'Standard'
>   and comparator = 'CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.
>   and default_validation_class = 'UTF8Type'
>   and key_validation_class = 'UTF8Type'
>   and read_repair_chance = 0.1
>   and dclocal_read_repair_chance = 0.0
>   and gc_grace = 864000
>   and min_compaction_threshold = 4
>   and max_compaction_threshold = 32
>   and replicate_on_write = true
>   and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
>   and caching = 'KEYS_ONLY'
>   and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
> When I use a slice_range y get the information but when i tried to get only one column from the row  
>   
>         ColumnPath path = new ColumnPath("CountryStateCity");
>         
>         String columnName="T1";
>         path.setColumn(toByteBuffer(columnName));
>         String rowKey="TX:BE5";
>        ColumnOrSuperColumn c1=client.get(toByteBuffer(rowKey), path, ConsistencyLevel.ONE);
> I have this error:
> InvalidRequestException(why:Not enough bytes to read value of component 0)
> 	at org.apache.cassandra.thrift.Cassandra$get_result.read(Cassandra.java:5930)
> 	at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
> 	at org.apache.cassandra.thrift.Cassandra$Client.recv_get(Cassandra.java:505)
> 	at org.apache.cassandra.thrift.Cassandra$Client.get(Cassandra.java:490)
> 	at ThirftGet.main(ThirftGet.java:53)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira