You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2011/04/30 06:08:03 UTC
[jira] [Resolved] (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:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-2585.
---------------------------------------
Resolution: Not A Problem
LongType is fixed-width 8 bytes, but IntegerType is a varint -- it will use more bytes to represent larger numbers, and less for small ones.
> 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