cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tyler Hobbs <>
Subject Re: Question on ByteOrdered rebalancing
Date Thu, 15 Mar 2012 00:41:45 GMT
On Wed, Mar 14, 2012 at 4:17 PM, work late <> wrote:

> The bytes being the key I use or what ?

Yes.  Partitioners split up the space of possible keys based on the tokens
of the nodes.  For BOP, a node's primary range will include all rows with
keys that are less than it's token and greater than the token of the node
with the next smallest token.

So, if you have two nodes with tokens "a" and "b", the node with token "b"
will be the primary replica for all rows whose key falls between "a" and
"b" (essentially, all keys that start with "a").

With BOP, the ideal set of tokens would split a sorted list all of the keys
in your data into equal partitions.  You have to know the distribution of
your keys to do this properly, and the correct choice of tokens will change
over time as your data does.  This is why we typically strongly advise
against using ordered partitioner.

When you're doing a move with BOP using nodetool, you specify the new token
in hex.

> Maybe you answered the 2nd question and I don't get it, but what would I
> pass the move command when I want to rebalance the cluster?
> Thanks
>  On Tue, Mar 13, 2012 at 11:34 AM, Tyler Hobbs <> wrote:
>> The tokens are hex encoded arrays of bytes.
>> On Tue, Mar 13, 2012 at 1:05 PM, work late <>wrote:
>>> The ring command on nodetool shows as
>>> Address         DC          Rack        Status State   Load
>>>  Owns    Token
>>>        Token(bytes[88401b216270ab8ebb690946b0b70eab])
>>>     datacenter1 rack1       Up     Normal  69.1 KB
>>> 50.00%  Token(bytes[4936c862b88db2bdd92d684583bf0280])
>>>    datacenter1 rack1       Up     Normal  69.1 KB
>>> 50.00%  Token(bytes[88401b216270ab8ebb690946b0b70eab])
>>> The token looks like a MD5 value, is that correct? So when rebalancing
>>> the cluster, what is the token value I am supposed to give the move command
>>> (with RP it is the token between 0- 2^127), what should I use BOP?
>>> Thanks
>> --
>> Tyler Hobbs
>> DataStax <>

Tyler Hobbs
DataStax <>

View raw message