Database Reference
In-Depth Information
The Mumur3 partitioner
The Murmur3 partitioner is the new default for Cassandra Version 1.2 or higher. If you are
starting a new cluster, it is recommended to keep the Mumur3 partitioner. It is not order
preserving, and it has all the features of a Random partitioner plus it is fast and provides
better performance than a Random partitioner. Another difference is that a Random parti-
tioner generates token values between -263 and +263.
If you are migrating from a previous version to 1.2 or higher, please make sure that you
are using the same partitioner as the previous one. If you were using a default, it is likely
that you were using a Random partitioner. This will cause trouble if you have not edited
cassandra.yaml to change the new default Murmur3 partitioner back to a Random
partitioner.
To generate initial tokens, we'll again apply our familiar formula, but this time the start
position is not zero, so the range of tokens is (end to start): +263 - ( -263) = 264. Here is
the simple Python script to do this:
>>> nodes = 8
>>> print "\n".join(["Node #" + str(i+1) + ": " + str( -(2
** 63) + (2 ** 64)*i/nodes) for i in xrange(nodes)] )
Node #1: -9223372036854775808
Node #2: -6917529027641081856
Node #3: -4611686018427387904
Node #4: -2305843009213693952
Node #5: 0
Node #6: 2305843009213693952
Node #7: 4611686018427387904
Node #8: 6917529027641081856
Search WWH ::




Custom Search