Re: Error when bringing up 3rd node

2011-02-22 Thread mcasandra
Could someone please help me understand why this might have happened? -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Error-when-bringing-up-3rd-node-tp6041409p6054768.html Sent from the cassandra-u...@incubator.apache.org mailing list archive at

Re: Error when bringing up 3rd node

2011-02-21 Thread mcasandra
mcasandra wrote: > > I am still getting the following: > > On node 1: > ERROR 16:57:31,365 Fatal error: Bootstraping to existing token 0 is not > allowed (decommission/removetoken the old node first). > > On node 2: > ERROR 16:57:42,300 Fatal error: Bootstraping to existing token > 56713727820

Re: Error when bringing up 3rd node

2011-02-21 Thread mcasandra
I am still getting the following: On node 1: ERROR 16:57:31,365 Fatal error: Bootstraping to existing token 0 is not allowed (decommission/removetoken the old node first). On node 2: ERROR 16:57:42,300 Fatal error: Bootstraping to existing token 56713727820156410577229101238628035242 is not allo

Re: Error when bringing up 3rd node

2011-02-18 Thread Ching-Cheng Chen
If you know you will have 3 nodes, you should set the initial token inside the cassandra.yaml for each node. Then you won't need to run nodetool move. Regards, Chen www.evidentsoftware.com On Fri, Feb 18, 2011 at 5:24 PM, mcasandra wrote: > > Thanks! I feel so horrible after realizing what m

Re: Error when bringing up 3rd node

2011-02-18 Thread mcasandra
Thanks! I feel so horrible after realizing what mistaked I made :) After I bring up the new node I just need to run the following on old nodes? 1) New node set the initial token to 56713727820156410577229101238628035242 2) start new node 3) On second node run nodetool move 1134274556403128211544

Re: Error when bringing up 3rd node

2011-02-18 Thread Ching-Cheng Chen
try this BigInteger bi = new BigInteger("2"); BigInteger or = new BigInteger("2"); for (int i=1;i<127;i++) { or = or.multiply(bi); } or = or.divide(new BigInteger("3")); for (int i=0;i<3;i++) { System.out.println(or.multiply(new BigInteger(""+i))); } which generate 0 56713727820156410577229101

Re: Error when bringing up 3rd node

2011-02-18 Thread Jonathan Ellis
Also, ^ means xor in Java, not exponentiation. Just use the Python Eric linked. :) On Fri, Feb 18, 2011 at 3:24 PM, Ching-Cheng Chen wrote: > 41 > 82 > 123 > These certainly not correct.  Can't just use 2 ^ 127, will overflow > You can't use Java's primitive type to do this calculation.   long o

Re: Error when bringing up 3rd node

2011-02-18 Thread Eric Gilmore
I'm not sure I can say exactly why, but I'm sure those numbers can't be correct. One node should be zero and the other values should be very long numbers like 85070591730234615865843651857942052863. We need another Java expert's opinion here, but it looks like your snippet may have "integer overf

Re: Error when bringing up 3rd node

2011-02-18 Thread Ching-Cheng Chen
41 82 123 These certainly not correct. Can't just use 2 ^ 127, will overflow You can't use Java's primitive type to do this calculation. long only use 64 bit. You'd need to use BigInteger class to do this calculation. Regards, Chen www.evidentsoftware.com On Fri, Feb 18, 2011 at 4:04 PM,

Re: Error when bringing up 3rd node

2011-02-18 Thread mcasandra
Thanks! This is what I got. Is this right? public class TokenCalc{ public static void main(String ...args){ int nodes=3; for(int i = 1 ; i <= nodes; i++) { System.out.println( (2 ^ 127) / nodes * i); } } } 41 82 123 -- View this message in context: htt

Re: Error when bringing up 3rd node

2011-02-18 Thread Eric Gilmore
A Java program should work fine. The Wiki and the DataStax documentation use a python program for the same purpose: http://www.datastax.com/docs/0.7/operations/clustering#calculating-tokens On Fri, Feb 18, 2011 at 12:45 PM, mcasandra wrote: > > Yes I had set the first node to token 0. I think

Re: Error when bringing up 3rd node

2011-02-18 Thread mcasandra
Yes I had set the first node to token 0. I think I read somewhere in the docs. What should I do. Should I write a java program to calculate the hash for 3 nodes and distribute it accross 3 nodes? -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Er

Re: Error when bringing up 3rd node

2011-02-18 Thread Eric Gilmore
It sounds like one of your existing nodes already has the initial token zero. Did you set the intial token of the first node you brought online to zero? On Fri, Feb 18, 2011 at 12:35 PM, mcasandra wrote: > > I see following error. Is it because I have initial token defined? What > token > shoul