incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <>
Subject Re: Decorator Algorithm
Date Thu, 23 Jun 2011 19:27:30 GMT
Various places in the code call IPartitioner.decorateKey() which returns a DecoratedKey<T>
which contains both the original key and the Token<T>

The RandomPartitioner md5 to hash the key ByteBuffer and create a BigInteger. OPP converts
the key into utf8 encoded String.  

Using the token to find which endpoints contain replicas is done by the AbstractReplicationStrategy.calculateNaturalEndpoints()

Does that help? 

Aaron Morton
Freelance Cassandra Developer

On 23 Jun 2011, at 19:58, Jonathan Colby wrote:

> Hi -
> I'd like to understand more how the token is hashed with the key to determine on which
node the data is stored - called decorating in cassandra speak.
> Can anyone share any documentation on this or describe this more in detail?   Yes, I
could look at the code, but I was hoping to be able to read more about how it works first.
> thanks.

View raw message