From user-return-24540-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Mon Mar 5 10:39:22 2012 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 C94BE9CCF for ; Mon, 5 Mar 2012 10:39:22 +0000 (UTC) Received: (qmail 31493 invoked by uid 500); 5 Mar 2012 10:39:20 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 31467 invoked by uid 500); 5 Mar 2012 10:39:20 -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 31459 invoked by uid 99); 5 Mar 2012 10:39:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2012 10:39:20 +0000 X-ASF-Spam-Status: No, hits=3.3 required=5.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS,TRACKER_ID X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hontvari@flyordie.com designates 95.211.130.66 as permitted sender) Received: from [95.211.130.66] (HELO mail.flyordie.com) (95.211.130.66) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 05 Mar 2012 10:39:15 +0000 Received: from [192.168.0.5] ([91.82.147.249]) by mail.flyordie.com with SMTP (Mireka 3.2beta2) for user@cassandra.apache.org; Mon, 05 Mar 2012 11:38:53 +0100 (CET) Message-ID: <4F5497BE.5090001@flyordie.com> Date: Mon, 05 Mar 2012 11:38:54 +0100 From: =?ISO-8859-1?Q?Hontv=E1ri_J=F3zsef_Levente?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Re: running two rings on the same subnet References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------010000090702090403010201" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------010000090702090403010201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit You have to use PropertyFileSnitch and NetworkTopologyStrategy to create a multi-datacenter setup with two circles. You can start reading from this page: http://www.datastax.com/docs/1.0/cluster_architecture/replication#about-replica-placement-strategy Moreover all tokens must be unique (even across datacenters), although - from pure curiosity - I wonder what is the rationale behind this. By the way, can someone enlighten me about the first line in the output of the nodetool. Obviously it contains a token, but nothing else. It seems like a formatting glitch, but maybe it has a role. On 2012.03.05. 11:06, Tamar Fraenkel wrote: > Hi! > I have a Cassandra cluster with two nodes > > nodetool ring -h localhost > Address DC Rack Status State Load > Owns Token > > 85070591730234615865843651857942052864 > 10.0.0.19 datacenter1 rack1 Up Normal 488.74 KB > 50.00% 0 > 10.0.0.28 datacenter1 rack1 Up Normal 504.63 KB > 50.00% 85070591730234615865843651857942052864 > > I want to create a second ring with the same name but two different nodes. > using tokengentool I get the same tokens as they are affected from the > number of nodes in a ring. > > My question is like this: > Lets say I create two new VMs, with IPs: 10.0.0.31 and 10.0.0.11 > _In 10.0.0.31 cassandra.yaml I will set_ > initial_token: 0 > seeds: "10.0.0.31" > listen_address: 10.0.0.31 > rpc_address: 0.0.0.0 > > _In 10.0.0.11 cassandra.yaml I will set_ > initial_token: 85070591730234615865843651857942052864 > seeds: "10.0.0.31" > listen_address: 10.0.0.11 > rpc_address: 0.0.0.0 > > *Would the rings be separate?* > > Thanks, > > *Tamar Fraenkel * > Senior Software Engineer, TOK Media > > Inline image 1 > > tamar@tok-media.com > Tel: +972 2 6409736 > Mob: +972 54 8356490 > Fax: +972 2 5612956 > > > --------------010000090702090403010201 Content-Type: multipart/related; boundary="------------020408040702080302080602" --------------020408040702080302080602 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit You have to use PropertyFileSnitch and NetworkTopologyStrategy to create a multi-datacenter setup with two circles. You can start reading from this page:
http://www.datastax.com/docs/1.0/cluster_architecture/replication#about-replica-placement-strategy

Moreover all tokens must be unique (even across datacenters), although - from pure curiosity - I wonder what is the rationale behind this.

By the way, can someone enlighten me about the first line in the output of the nodetool. Obviously it contains a token, but nothing else. It seems like a formatting glitch, but maybe it has a role.

On 2012.03.05. 11:06, Tamar Fraenkel wrote:
Hi!
I have a Cassandra  cluster with two nodes

nodetool ring -h localhost
Address         DC          Rack        Status State   Load            Owns    Token
                                                                               85070591730234615865843651857942052864
10.0.0.19       datacenter1 rack1       Up     Normal  488.74 KB       50.00%  0
10.0.0.28       datacenter1 rack1       Up     Normal  504.63 KB       50.00%  85070591730234615865843651857942052864

I want to create a second ring with the same name but two different nodes.
using tokengentool I get the same tokens as they are affected from the number of nodes in a ring.

My question is like this:
Lets say I create two new VMs, with IPs: 10.0.0.31 and 10.0.0.11
In 10.0.0.31 cassandra.yaml I will set
initial_token: 0
seeds: "10.0.0.31"
listen_address: 10.0.0.31
rpc_address: 0.0.0.0

In 10.0.0.11 cassandra.yaml I will set
initial_token: 85070591730234615865843651857942052864
seeds: "10.0.0.31"
listen_address: 10.0.0.11
rpc_address: 0.0.0.0 

Would the rings be separate?

Thanks,

Tamar Fraenkel 
Senior Software Engineer, TOK Media 





--------------020408040702080302080602 Content-Type: image/png Content-Transfer-Encoding: base64 Content-ID: iVBORw0KGgoAAAANSUhEUgAAAF0AAAAnCAYAAABtyERkAAAABGdBTUEAALGPC/xhBQAACkNp Q0NQSUNDIFByb2ZpbGUAAHgBnZZ3VFNZE8Dvey+90BJCkRJ6DU1KAJESepFeRSUkAUIJGBKw V0QFVxQVaYoiiyIuuLoUWSuiWFgUFLAvyCKgrIuriIplX/QcZf/Y/b6z88ec35s7c+/cmbnn PAAovoFCUSasAECGSCIO8/FgxsTGMfHdAAZEgAPWAHB52VlB4d4RABU/Lw4zG3WSsUygz/p1 /xe4xfINYT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tod4tD+ug/YeTYP7+UM91L1QNHUzOwz/YJnsh0qRJ k7hkl9CBBsb3vLzD3MvhzfMa6GgAAi9E7RXlYDy0D2z3rnUWGwmN7JnvE5MF2vnLZPNw1xVj YmKgqqpasPwCa2lCQy/BggXzualeiemuRrv2jRnpoE+MA9st56yg67ie+uy0WBiy9UfQLVrT b4CjDRg60tLoOXvexvz8I11pggEJOm9ob++ayI0c2Hj47MlevLfr4TzcRiYkxIuqwOovTBN4 NbyIWihRqB4/gxxQvAJMGPnY8Q8ENkT6VlDiEpKHYfioqKgQLMnAcjss2Rg0oKtDZoA2IZXU wZCvWp08NSuS0fRgYHJyMilV2SL4RYppYMmg68iDCn0MoKy/iF1Eio6WkaKjsP734CBSnUsj IT5tLO7bExPXQWnpZZqY43Gl0oJSBQTN4yZ2r4IuQEqisTTaJy0ddO+uJOen9JRw96TB15Ls 6Uo8mnrmdNCuJp69cCFgnuZ5pQEBOuZidHFrwGe2Z0X8g/WleD28WGprgZ0gPcU6WIF2tNvr oDsa839pP5cfRwP95f0HN8yA0D1xOrwAAAAASUVORK5CYII= --------------020408040702080302080602-- --------------010000090702090403010201--