incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Katkov <ikat...@gmail.com>
Subject distributing tokens equally along the key distribution space
Date Thu, 01 Oct 2009 16:26:45 GMT
Hi,

Question#1:
How to manually select tokens to force equal spacing of tokens around the
hash space?
If RandomPartitioner is used a token is a BigInteger, so there are no [0,
Max value] interval to select token values from.
If everything is left to defaults, a token is a random number (hash of GUID)
so these 10 generated tokens will not be evenly spaced on the ring.
Suppose I have X nodes, what would be correct token values?

Question#2:
Let's assume that #1 was resolved somehow and key distribution is more or
less even.
A new node "C" joins the cluster. It's token falls somewhere between two
other tokens on the ring (from nodes "A" and "B" clockwise-ordered). From
now on "C" is responsible for a portion of data that used to exclusively
belong to "B".
a. Cassandra v.0.4 will not automatically transfer this data to "C" will it?

b. Do all reads to these keys fail?
c. What happens with the data reference by these keys on "B"? It will never
be accessed there, therefor it becomes garbage. Since there are to GC will
it stick forever?
d. What happens to replicas of these keys?

Mime
View raw message