voldemort.utils
Class FnvHashFunction
java.lang.Object
voldemort.utils.FnvHashFunction
- All Implemented Interfaces:
- HashFunction
public class FnvHashFunction
- extends java.lang.Object
- implements HashFunction
Taken from http://www.isthe.com/chongo/tech/comp/fnv
hash = basis for each octet_of_data to be hashed hash = hash * FNV_prime hash
= hash xor octet_of_data return hash
Method Summary |
int |
hash(byte[] key)
|
long |
hash64(long val)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FNV_BASIS_64
public static final long FNV_BASIS_64
- See Also:
- Constant Field Values
FNV_PRIME_64
public static final long FNV_PRIME_64
- See Also:
- Constant Field Values
FnvHashFunction
public FnvHashFunction()
hash
public int hash(byte[] key)
- Specified by:
hash
in interface HashFunction
hash64
public long hash64(long val)
main
public static void main(java.lang.String[] args)
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu