Are integer indexes in 2i 64-bit or 32-bit?

Guido Medina lic_gma at hotmail.com
Fri Jun 8 10:53:57 EDT 2012


That sounds like the perfect solution, design/POJO wise will allow the 
developer to use whatever Number<?> type while inside it is always a 
BigInteger. Very well thought out.

Guido.

On 08/06/12 15:50, Brian Roach wrote:
> The problem with long on Java is that it's a signed 64 bit int which doesn't fully solve the issue; there would be someone out there that would send in a bug saying that when you hit 2^63 it rolled over.
>
> The plan (if my memory is working, I have this written down on an ever growing todo list) is to switch to using BigInteger internally in RiakIndex with the interface / annotations allowing for any of the types to be passed in.
>
> - Roach
>
> On Jun 8, 2012, at 4:18 AM, Guido Medina wrote:
>
>> I would say just to add long and Long for indexing (So it that it supports Long, Integer and their respective natives), using BigNumber subclasses have a different semantic and would restrict the developers when designing the Riak POJOs.
>>
>> Guido.
>>
>> On 08/06/12 06:37, Russell Brown wrote:
>>> On 7 Jun 2012, at 22:55, Guido Medina wrote:
>>>
>>>> All points to 32 bits, at least for the Java client side (indexes can be of type Integer, not Long which is the 64 bits) Look for RiakIndex.java, that will give you some answers.
>>> That's a mistake on the part of the client developer at that time (me). They should probably be BigInteger, since integers can be arbitrarily large in erlang. I'm pretty sure Brian Roach (the new, smarter, Java developer) is addressing this https://github.com/basho/riak-java-client/issues/112
>>>
>>> Russell
>>>
>>>>
>>>> I don’t know the exact answer though.
>>>>
>>>> Regards,
>>>>
>>>> Guido.
>>>>
>>>> From: Alexander Sicular
>>>> Sent: Thursday, June 07, 2012 10:43 PM
>>>> To: Berend Ozceri
>>>> Cc: riak-users at lists.basho.com
>>>> Subject: Re: Are integer indexes in 2i 64-bit or 32-bit?
>>>>
>>>> I would say yes... Probably, if you're on a 64bit system. . Unless you're shifting stuff through JavaScript in which case I doubt it. Cause last I checked, js don't speak 64bit int.
>>>>
>>>>
>>>> @siculars on twitter
>>>> http://siculars.posterous.com
>>>>
>>>> Sent from my iRotaryPhone
>>>>
>>>> On Jun 7, 2012, at 17:08, Berend Ozceri<berend at eye.fi>  wrote:
>>>>
>>>>> I apologize for asking this question if it's an FAQ or is documented somewhere, but I don't see anything specific mentioned about the size of integer indexes in 2i:
>>>>>
>>>>> http://wiki.basho.com/Secondary-Indexes.html
>>>>>
>>>>> I certainly could dive into to source code to answer this question, but in case someone here knows, what's the size of an integer index in 2i? I'm hoping that the answer will be that it's 64 bits…
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Berend
>>>>>
>>>>> _______________________________________________
>>>>> riak-users mailing list
>>>>> riak-users at lists.basho.com
>>>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>> _______________________________________________
>>>> riak-users mailing list
>>>> riak-users at lists.basho.com
>>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>> _______________________________________________
>>>> riak-users mailing list
>>>> riak-users at lists.basho.com
>>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>> _______________________________________________
>> riak-users mailing list
>> riak-users at lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>




More information about the riak-users mailing list