cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Gilmore <e...@datastax.com>
Subject Re: Error when bringing up 3rd node
Date Fri, 18 Feb 2011 21:24:59 GMT
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
overflow<http://www.mkyong.com/java/javas-silent-killer-buffer-overflow-careful/>"
or "integer overload" going on.

On Fri, Feb 18, 2011 at 1:04 PM, mcasandra <mohitanchlia@gmail.com> wrote:

>
> 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:
> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Error-when-bringing-up-3rd-node-tp6041409p6041471.html
> Sent from the cassandra-user@incubator.apache.org mailing list archive at
> Nabble.com.
>

Mime
View raw message