Last active
August 29, 2015 13:57
-
-
Save EnigmaCurry/9401469 to your computer and use it in GitHub Desktop.
Example of murmur3 hashing in Jython
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
from org.apache.cassandra.dht import Murmur3Partitioner | |
from org.apache.cassandra.utils import ByteBufferUtil | |
from java.lang import Integer | |
p = Murmur3Partitioner() | |
int_token = p.getToken(ByteBufferUtil.bytes(Integer(10))) | |
string_token = p.getToken(ByteBufferUtil.bytes("asdf")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment