voldemort.utils
Class FnvHashFunction

java.lang.Object
  extended by 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


Field Summary
static long FNV_BASIS_64
           
static long FNV_PRIME_64
           
 
Constructor Summary
FnvHashFunction()
           
 
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
 

Field Detail

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
Constructor Detail

FnvHashFunction

public FnvHashFunction()
Method Detail

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