Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6AA249827 for ; Thu, 15 Mar 2012 00:42:15 +0000 (UTC) Received: (qmail 93998 invoked by uid 500); 15 Mar 2012 00:42:13 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 93973 invoked by uid 500); 15 Mar 2012 00:42:13 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 93965 invoked by uid 99); 15 Mar 2012 00:42:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 00:42:13 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tyler@datastax.com designates 209.85.215.44 as permitted sender) Received: from [209.85.215.44] (HELO mail-lpp01m010-f44.google.com) (209.85.215.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 00:42:06 +0000 Received: by lagj5 with SMTP id j5so2314958lag.31 for ; Wed, 14 Mar 2012 17:41:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=j3kzajYeFseknJ5XXJ0vr2Hum8LvjbDmYGDa7fI67wo=; b=keBLgVlNyTbGDnx9767YBud6OPUKjs1IHFib5zAuvbSqO7++Lvq0OEe56O7XR9KQpc 842DjSYFcQWNskAxBdWYkNfcQFFrFrJw4tWfQBNGSoKvS+GFYjdToABH8/Lal518uE3x T0hZAVZnt+FqBiv4CaCta1jTVJcCN99MdRUnBJk+2vL9H4z30+K1c+Ze8aXEGUOLgBkV GgYTuhZZzOdsv37yGIfp9XJ+udmOyrrMBr1qDq5E2FNSlTLLS/AkGEc97rUkvwBBwOOF /rqEPYbJKHUTdnZINgwB0gUoiQ6jHvUBSZltjPX3pM5u8rI5AZLhL4pTI/JioDudDKAm MPwg== MIME-Version: 1.0 Received: by 10.112.83.163 with SMTP id r3mr1720216lby.80.1331772105026; Wed, 14 Mar 2012 17:41:45 -0700 (PDT) Received: by 10.112.24.170 with HTTP; Wed, 14 Mar 2012 17:41:45 -0700 (PDT) In-Reply-To: References: Date: Wed, 14 Mar 2012 19:41:45 -0500 Message-ID: Subject: Re: Question on ByteOrdered rebalancing From: Tyler Hobbs To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d0401fad33debe004bb3d5b45 X-Gm-Message-State: ALoCoQldXUnWbVFpZKzszrrrkZEGPlnt6eGjVWx+cLST9XRQOssr3AZdH5LQf3vsnHa3xYrHSsmm X-Virus-Checked: Checked by ClamAV on apache.org --f46d0401fad33debe004bb3d5b45 Content-Type: text/plain; charset=ISO-8859-1 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]) >>> 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 >> >> > -- Tyler Hobbs DataStax --f46d0401fad33debe004bb3d5b45 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Wed, Mar 14, 2012 at 4:17 PM, work late <worklate1234@gma= il.com> wrote:
The bytes being the key I use or what ?

Yes.=A0 Partit= ioners split up the space of possible keys based on the tokens of the nodes= .=A0 For BOP, a node's primary range will include all rows with keys th= at 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 k= eys 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.=A0 You have to know the distributi= on of your keys to do this properly, and the correct choice of tokens will = change over time as your data does.=A0 This is why we typically strongly ad= vise against using ordered partitioner.

When you're doing a move with BOP using nodetool, you specify the n= ew token in hex.
=A0
Maybe you answered the 2nd question and I don't get it, but what w= ould I pass the move command when I want to rebalance the cluster?=A0
=

Thanks


On Tue, Mar 13, 2012 at 11:34 AM, Tyler Hobbs <tyler@datastax.com>= wrote:
The tokens are hex encoded arrays of bytes.


On Tue, Mar 13, 2012 at 1:05 PM, work late &= lt;worklate1234= @gmail.com> wrote:
The ring command on nodetool shows as
Address =A0 =A0 =A0 =A0 DC =A0 =A0 =A0 =A0 =A0Rack =A0 = =A0 =A0 =A0Status State =A0 Load =A0 =A0 =A0 =A0 =A0 =A0Owns =A0 =A0Token = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0Token(bytes[88401b216270ab8ebb690946b0b70eab])
10.1.1.1 =A0 =A0 datacenter1 rack1 =A0 =A0 =A0 Up =A0 =A0 Normal =A069= .1 KB =A0 =A0 =A0 =A0 50.00% =A0Token(bytes[4936c862b88db2bdd92d684583bf028= 0])
10.1.1.2 =A0 =A0datacenter1 rack1 =A0 =A0 =A0 Up =A0 =A0 Norm= al =A069.1 KB =A0 =A0 =A0 =A0 50.00% =A0Token(bytes[88401b216270ab8ebb69094= 6b0b70eab])


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
<= br>




--
Tyler Hobbs
DataStax
<= br> --f46d0401fad33debe004bb3d5b45--