You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Olivier Smadja (JIRA)" <ji...@apache.org> on 2011/04/30 13:54:03 UTC

[jira] [Commented] (CASSANDRA-2585) Inserting integer value using cassandra cli result in byte array of size 1 insteand of 4

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

Olivier Smadja commented on CASSANDRA-2585:
-------------------------------------------

Ok. Thanks Jonathan. So the problem is in the Hector API that assumes that
an int has always 4 bytes.

Olivier




> Inserting integer value using cassandra cli result in byte array of size 1 insteand of 4
> ----------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2585
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2585
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 0.7.5
>         Environment: mac os, java 6
>            Reporter: Olivier Smadja
>
> I create a column family Stream like this : 
> create column family Stream with comparator=AsciiType and column_metadata=[
> {column_name: 'type', validation_class: IntegerType}];
> Then I create some data using cassandra-cli :
> set Stream['oid'][status]=1;
> cli stores a byte array of length 1 in Stream['oid'][status].
> As the status field is marked as integer, my understanding is that the data stored should be an array of 4 bytes representing the number '1'.
> This causes problems when using hector object mapping api.
> Thanks

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira