incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: Can initial_token be decimal or hexadecimal format?
Date Tue, 13 Sep 2011 15:20:58 GMT
Parsing is done by TokenFactory.fromString, so yes, it matters per partitioner.

On Tue, Sep 13, 2011 at 4:09 AM, Mck <mck@apache.org> wrote:
> And does it matter when using different partitoners?
>
> In the config it seems only strings are used.
> In RP it parses this string into a BigInteger so it needs to be in
> decimal format,
> but for ByteOrderPartitioner it uses FBUtilities.hexToBytes(..) when
> translating a string to a token (BytesToken).
>
> More to the point...
> For a 3 node cluster using BOP where my largest token will be
> 0x80000000000000000000000000000000 (coincidently 2**127)
> should i write out initial_tokens like
>
> node0: 0
> node1: 2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> node2: 55555555555555555555555555555554
>
> or like
>
> node0: 0
> node1: 56713727820156410577229101238628035242
> node2: 113427455640312821154458202477256070484
>
>
> If it is the former there's some important documentation missing.
>
> ~mck
>
>
> ps CASSANDRA-1006 seems to be of some relation.
>
>
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com

Mime
View raw message