incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From horschi <hors...@gmail.com>
Subject Re: Murmur Long.MIN_VALUE token allowed?
Date Tue, 10 Dec 2013 08:15:46 GMT
Hi Aaron,

thanks for your response. But that is exactly what scares me:
RandomPartitioner.MIN is -1, which is not a valid token :-)

And my feeling gets worse when I look at Murmur3Partitioner.normalize().
This one explicitly excludes Long.MIN_VALUE by changing it to
Long.MAX_VALUE.

I think I'll just avoid it in the future. Better safe than sorry...

cheers,
Christian


On Tue, Dec 10, 2013 at 8:24 AM, Aaron Morton <aaron@thelastpickle.com>wrote:

> AFAIK any value that is a valid output from murmor3 is a valid token.
>
> The Murmur3Partitioner set’s min and max to long min and max…
>
>     public static final LongToken MINIMUM = new LongToken(Long.MIN_VALUE);
>     public static final long MAXIMUM = Long.MAX_VALUE;
>
> Cheers
>
> -----------------
> Aaron Morton
> New Zealand
> @aaronmorton
>
> Co-Founder & Principal Consultant
> Apache Cassandra Consulting
> http://www.thelastpickle.com
>
> On 5/12/2013, at 12:38 am, horschi <horschi@gmail.com> wrote:
>
> Hi,
>
> I just realized that I can move a node to Long.MIN_VALUE:
>
> 127.0.0.1  rack1       Up     Normal  1011.58 KB      100.00%
> -9223372036854775808
>
> Is that really a valid token for Murmur3Partitioner ?
>
> I thought that Long.MIN_VALUE (like -1 for Random) is not a regular token.
> Shouldn't be only used for token-range-scans?
>
> kind regards,
> Christian
>
>
>

Mime
View raw message