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

Eric Evans commented on CASSANDRA-3031:
---------------------------------------

{quote}
I suppose we could provide a conversion tool that converts int -> long in cql 
scripts.
{quote}

That was merely one example.  When changing documented behavior that people 
have come to rely on, there is no end to the different ways this could disrupt.

We're going to run into cases where we wished something had been implemented 
differently, that's unavoidable.  I think we just have to weigh each one for 
the cost:benefit of changing it.

If we decide it is worth it to make a change, we should stick to our guns and 
bump the major.  This shouldn't be done lightly, or often, or used as a license 
to go nuts, and plenty of time should be given to let concerned parties know 
exactly what is coming down the pipeline.

{quote}
I don't understand the claim that we need this for Hector compatibility, 
though. My understanding is that our varint would be just fine with 32bit ints 
– since the length is part of the byte[] encoding, we don't have to do clever 
things like hadoop's vint does 
(http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/io/WritableUtils.html).
{quote}

If I understand correctly, Hector is Doing It Wrong (wrong in the sense that it 
does not match Cassandra's implementation).  Pycassa had a similar bug (assumed 
4 bytes for IntegerType) up until relatively recently.

> Add 4 byte integer type
> -----------------------
>
>                 Key: CASSANDRA-3031
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3031
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.4
>         Environment: any
>            Reporter: Radim Kolar
>            Priority: Minor
>              Labels: hector, lhf
>             Fix For: 1.0
>
>         Attachments: apache-cassandra-0.8.4-SNAPSHOT.jar, src.diff, test.diff
>
>
> Cassandra currently lacks support for 4byte fixed size integer data type. 
> Java API Hector and C libcassandra likes to serialize integers as 4 bytes in 
> network order. Problem is that you cant use cassandra-cli to manipulate 
> stored rows. Compatibility with other applications using api following 
> cassandra integer encoding standard is problematic too.
> Because adding new datatype/validator is fairly simple I recommend to add 
> int4 data type. Compatibility with hector is important because it is most 
> used Java cassandra api and lot of applications are using it.
> This problem was discussed several times already 
> http://comments.gmane.org/gmane.comp.db.hector.user/2125
> https://issues.apache.org/jira/browse/CASSANDRA-2585
> It would be nice to have compatibility with cassandra-cli and other 
> applications without rewriting hector apps.

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


Reply via email to