Do you want to create two separate clusters or a single cluster with two data centres ?If it's the later, token selection is discussed here http://www.datastax.com/docs/1.0/install/cluster_init#token-gen-cassandraOtherwise data is not evenly distributed.Moreover all tokens must be unique (even across datacenters), although - from pure curiosity - I wonder what is the rationale behind this.
It's the exclusive lower bound token for the first node in the ring. This also happens to be the token for the last node in the ring.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.
In your setup10.0.0.19 "owns" (85070591730234615865843651857942052864+1) to 010.0.0.28 "owns" (0 + 1) to 85070591730234615865843651857942052864(does not imply primary replica, just used to map keys to nodes.)On 5/03/2012, at 11:38 PM, Hontvári József Levente wrote: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 localhostAddress DC Rack Status State Load Owns Token8507059173023461586584365185794205286410.0.0.19 datacenter1 rack1 Up Normal 488.74 KB 50.00% 010.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.11In 10.0.0.31 cassandra.yaml I will setinitial_token: 0seeds: "10.0.0.31"listen_address: 10.0.0.31rpc_address: 0.0.0.0
In 10.0.0.11 cassandra.yaml I will setinitial_token: 85070591730234615865843651857942052864seeds: "10.0.0.31"listen_address: 10.0.0.11rpc_address: 0.0.0.0
Would the rings be separate?
Thanks,
Tamar Fraenkel
Senior Software Engineer, TOK Media
<Mail Attachment.png>