You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by work late <wo...@gmail.com> on 2012/03/13 19:05:11 UTC
Question on ByteOrdered rebalancing
The ring command on nodetool shows as
Address DC Rack Status State Load Owns
Token
Token(bytes[88401b216270ab8ebb690946b0b70eab])
10.1.1.1 datacenter1 rack1 Up Normal 69.1 KB 50.00%
Token(bytes[4936c862b88db2bdd92d684583bf0280])
10.1.1.2 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
Re: Question on ByteOrdered rebalancing
Posted by Tyler Hobbs <ty...@datastax.com>.
On Wed, Mar 14, 2012 at 4:17 PM, work late <wo...@gmail.com> 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 <ty...@datastax.com> wrote:
>
>> The tokens are hex encoded arrays of bytes.
>>
>>
>> On Tue, Mar 13, 2012 at 1:05 PM, work late <wo...@gmail.com>wrote:
>>
>>> The ring command on nodetool shows as
>>>
>>> Address DC Rack Status State Load
>>> Owns Token
>>>
>>> Token(bytes[88401b216270ab8ebb690946b0b70eab])
>>> 10.1.1.1 datacenter1 rack1 Up Normal 69.1 KB
>>> 50.00% Token(bytes[4936c862b88db2bdd92d684583bf0280])
>>> 10.1.1.2 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 <http://datastax.com/>
>>
>>
>
--
Tyler Hobbs
DataStax <http://datastax.com/>
Re: Question on ByteOrdered rebalancing
Posted by work late <wo...@gmail.com>.
The bytes being the key I use or what ?
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 <ty...@datastax.com> wrote:
> The tokens are hex encoded arrays of bytes.
>
>
> On Tue, Mar 13, 2012 at 1:05 PM, work late <wo...@gmail.com> wrote:
>
>> The ring command on nodetool shows as
>>
>> Address DC Rack Status State Load
>> Owns Token
>>
>> Token(bytes[88401b216270ab8ebb690946b0b70eab])
>> 10.1.1.1 datacenter1 rack1 Up Normal 69.1 KB
>> 50.00% Token(bytes[4936c862b88db2bdd92d684583bf0280])
>> 10.1.1.2 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 <http://datastax.com/>
>
>
Re: Question on ByteOrdered rebalancing
Posted by Tyler Hobbs <ty...@datastax.com>.
The tokens are hex encoded arrays of bytes.
On Tue, Mar 13, 2012 at 1:05 PM, work late <wo...@gmail.com> wrote:
> The ring command on nodetool shows as
>
> Address DC Rack Status State Load
> Owns Token
>
> Token(bytes[88401b216270ab8ebb690946b0b70eab])
> 10.1.1.1 datacenter1 rack1 Up Normal 69.1 KB 50.00%
> Token(bytes[4936c862b88db2bdd92d684583bf0280])
> 10.1.1.2 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 <http://datastax.com/>