
A handy Apache Cassandra token calculator for online initial token calculation with RandomPartitioner and Murmur3Partitioner
When creating a Cassandra cluster and not using virtual nodes that were introduced in version 1.2 (and are not fully supported by OpsCenter yet), you need to define the token range each individual cluster node is responsible for. If you set up Cassandra Clusters from time to time (like I do), this online calculator can be quite handy for you.
Just enter the amount of nodes you want to have initially and the partitioner (either RandomPartitioner or Murmur3Partitioner which is default in Cassandra 1.2+):
Cassandra Token Calculator
Partitioner | |
---|---|
Number of nodes | |
Result |
Note: This implementation uses the BigInteger JavaScript Library by Silent Matt.
Explanation of token calculation
The token calculation is basically a function that divides the whole token range into equally sized subparts. For the RandomPartitioner, Cassandra offers a tool to calculate the partitions, for Murmur3, a Python script is provided:
Latest posts by Gernot R. Bauer (see all)
- This was Cassandra Meetup in Vienna - 2014-01-20
- Announcement: First Cassandra Meetup Vienna on January 13, 2014 - 2014-01-09
- Cassandra Summit Europe 2013 - 2013-10-26
Admiring the time and energy you put into your website and in depth information you present.
It’s awesome to come across a blog every once in a while
that isn’t the same out of date rehashed material.
Great read! I’ve bookmarked your site and I’m including your RSS feeds to my Google account.