Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 83752 invoked from network); 12 Apr 2011 09:58:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2011 09:58:18 -0000 Received: (qmail 38853 invoked by uid 500); 12 Apr 2011 09:58:17 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 38222 invoked by uid 500); 12 Apr 2011 09:58:16 -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 38214 invoked by uid 99); 12 Apr 2011 09:58:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 09:58:16 +0000 X-ASF-Spam-Status: No, hits=4.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,TRACKER_ID,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dikang85@gmail.com designates 209.85.210.44 as permitted sender) Received: from [209.85.210.44] (HELO mail-pz0-f44.google.com) (209.85.210.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 09:58:11 +0000 Received: by pzk30 with SMTP id 30so2893479pzk.31 for ; Tue, 12 Apr 2011 02:57:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=uOBcC/LYLoJB+Aup6RmqS9AHBdKryiniOHO6AV0OeYo=; b=Bm6J1z5GDTK3m9ymS/FTgcRZx+sYK2TfntwXeLChQNlAQljxPsS8vOSEl0YDNpBXZR xlobe7HYvBNNlh/SCmNcrAm26fNG7U5Y5eimJ2u8jATgAXirb6uwowFtNKqiySziFka+ nD5UZmKxgbxgurJmxvbUOQsGz20cFcOWAPY0U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=AXFsKqUpRyEzChWwq8u1Bvqo10DO6YKslS0Na2zRZy8ExgcW/KHSnp94M5BXTJJ+jC Ih7BXoJX/3juWs8pJJM9T6qNZzYNOR/01HazmjW0Z39BY9LpgOu4OYjxn+NKHp8pDMLs c0uM5pKy9tJSJW4V8xNZeeuv/0nl+ucojyRc4= MIME-Version: 1.0 Received: by 10.143.3.8 with SMTP id f8mr172075wfi.39.1302602269745; Tue, 12 Apr 2011 02:57:49 -0700 (PDT) Received: by 10.68.65.135 with HTTP; Tue, 12 Apr 2011 02:57:49 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 Apr 2011 17:57:49 +0800 Message-ID: Subject: Re: Questions about the nodetool ring. From: Dikang Gu To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001636e909e392622f04a0b5b947 --001636e909e392622f04a0b5b947 Content-Type: text/plain; charset=ISO-8859-1 After the nodetool move, I got this: [root@server3 apache-cassandra-0.7.4]# bin/nodetool -h 10.18.101.213 ring Address Status State Load Owns Token 113427455640312821154458202477256070485 10.18.101.211 ? Normal 82.31 MB 33.33% 0 10.18.101.212 ? Normal 84.24 MB 33.33% 56713727820156410577229101238628035242 10.18.101.213 Up Normal 54.44 MB 33.33% 113427455640312821154458202477256070485 Is this correct? Why is the status "?" ? Thanks. On Tue, Apr 12, 2011 at 5:43 PM, Dikang Gu wrote: > The 3 nodes were added to the cluster at the same time, so I'm not sure > whey the data vary. > > I calculate the tokens and get: > node 0: 0 > node 1: 56713727820156410577229101238628035242 > node 2: 113427455640312821154458202477256070485 > > So I should set these tokens to the three nodes? > > And during the time I execute the nodetool move commands, can the cassandra > servers serve the front end requests at the same time? Is the data safe? > > Thanks. > > On Tue, Apr 12, 2011 at 5:15 PM, Jonathan Colby wrote: > >> This is "normal" when you just add single nodes. When no token is >> assigned, the new node takes a portion of the ring from the most heavily >> loaded node. As a consequence of this, the nodes will be out of balance. >> >> In other words, when you double the amount nodes you would not have this >> problem. >> >> The best way to rebalance the cluster is to generate new tokens and use >> the nodetool move command to rebalance the nodes, one at a time. >> >> After rebalancing you can run "cleanup" so the nodes get rid of data they >> no longer are responsible for. >> >> links: >> >> http://wiki.apache.org/cassandra/Operations#Range_changes >> >> http://wiki.apache.org/cassandra/Operations#Moving_or_Removing_nodes >> >> http://www.datastax.com/docs/0.7/operations/clustering#adding-capacity >> >> >> >> On Apr 12, 2011, at 11:00 AM, Dikang Gu wrote: >> >> > I have 3 cassandra 0.7.4 nodes in a cluster, and I get the ring stats: >> > >> > [root@yun-phy2 apache-cassandra-0.7.4]# bin/nodetool -h 192.168.1.28 -p >> 8090 ring >> > Address Status State Load Owns Token >> > >> 109028275973926493413574716008500203721 >> > 192.168.1.25 Up Normal 157.25 MB 69.92% >> 57856537434773737201679995572503935972 >> > 192.168.1.27 Up Normal 201.71 MB 24.28% >> 99165710459060760249270263771474737125 >> > 192.168.1.28 Up Normal 68.12 MB 5.80% >> 109028275973926493413574716008500203721 >> > >> > The load and owns vary on each node, is this normal? And is there a way >> to balance the three nodes? >> > >> > Thanks. >> > >> > -- >> > Dikang Gu >> > >> > 0086 - 18611140205 >> > >> >> > > > -- > Dikang Gu > > 0086 - 18611140205 > > -- Dikang Gu 0086 - 18611140205 --001636e909e392622f04a0b5b947 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable After the nodetool move, I got this:

[root@server3 apache= -cassandra-0.7.4]# bin/nodetool -h 10.18.101.213 ring
Address =A0= =A0 =A0 =A0 Status 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 =A011342745564031282115445820247725= 6070485 =A0 =A0=A0
10.18.101.211 =A0 ? =A0 =A0 =A0Normal =A082.31= MB =A0 =A0 =A0 =A033.33% =A00 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
10.18.101.212 =A0 ? =A0 =A0 =A0Normal =A084.24 MB =A0 =A0 =A0 =A033.33% =A0= 56713727820156410577229101238628035242 =A0 =A0 =A0
10.18.101.213 = =A0 Up =A0 =A0 Normal =A054.44 MB =A0 =A0 =A0 =A033.33% =A01134274556403128= 21154458202477256070485

Is this correct? Why is the status "?" ?

Thanks.

On Tue, Apr 12, 2011 at 5= :43 PM, Dikang Gu <dikang85@gmail.com> wrote:
The 3 nodes were added to the cluster at th= e same time, so I'm not sure whey the data vary.

I c= alculate the tokens and get:
node 0: 0
node 1: 5671372782015641057722910123862803524= 2
node 2: 113427455640312821154458202477256070485

So I should set these tokens to the three nodes? =A0

And during the time I execute the=A0nodetool move commands, can the c= assandra servers serve the front end requests at the same time? Is the data= safe?

Thanks.

On Tue, Apr 12, 2011 at 5:15 PM, Jonathan Colby <jonathan.colby@gmail.com> wrote:
This is "normal" when you just add= single nodes. =A0 When no token is assigned, the new node takes a portion = of the ring from the most heavily loaded node. =A0 =A0As a consequence of t= his, the nodes will be out of balance.

In other words, when you double the amount nodes you would not have this pr= oblem.

The best way to rebalance the cluster is to generate new tokens and use the= nodetool move <new-token> command to rebalance the nodes, one at a t= ime.

After rebalancing you can run "cleanup" so the nodes get rid of d= ata they no longer are responsible for.

links:

http://wiki.apache.org/cassandra/Operations#Range_changes<= br>
http://wiki.apache.org/cassandra/Operations#Moving_= or_Removing_nodes

http://www.datastax.com/docs/0.7/operations/clust= ering#adding-capacity



On Apr 12, 2011, at 11:00 AM, Dikang Gu wrote:

> I have 3 cassandra 0.7.4 nodes in a cluster, and I get the ring stats:=
>
> [root@yun-phy2 apache-cassandra-0.7.4]# bin/nodetool -h 192.168.1.28 -= p 8090 ring
> Address =A0 =A0 =A0 =A0 Status State =A0 Load =A0 =A0 =A0 =A0 =A0 =A0O= wns =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 =A010902827597392649341357471600850= 0203721
> 192.168.1.25 =A0 =A0Up =A0 =A0 Normal =A0157.25 MB =A0 =A0 =A0 69.92% = =A057856537434773737201679995572503935972
> 192.168.1.27 =A0 =A0Up =A0 =A0 Normal =A0201.71 MB =A0 =A0 =A0 24.28% = =A099165710459060760249270263771474737125
> 192.168.1.28 =A0 =A0Up =A0 =A0 Normal =A068.12 MB =A0 =A0 =A0 =A05.80%= =A0 109028275973926493413574716008500203721
>
> The load and owns vary on each node, is this normal? =A0And is there a= way to balance the three nodes?
>
> Thanks.
>
> --
> Dikang Gu
>
> 0086 - 18611140205
>




-- Dikang Gu

0086 - 18611140205




--
Dikang Gu

0086 - 18611140205

--001636e909e392622f04a0b5b947--