Created
March 8, 2013 16:44
-
-
Save memorycraft/5117846 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #RandomPartitionerの場合 | |
| def tokens(nodes): | |
| for x in xrange(nodes): | |
| print 2 ** 127 / nodes * x | |
| #Murmur3Partitionerの場合 | |
| def tokens(num_nodes): | |
| for i in range(num_nodes): | |
| print ((2**64 / num_nodes) * i) - 2**63 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment