org.apache.hadoop.hbase.util
Class MurmurHash3

java.lang.Object
  extended by org.apache.hadoop.hbase.util.Hash
      extended by org.apache.hadoop.hbase.util.MurmurHash3

@InterfaceAudience.Private
@InterfaceStability.Stable
public class MurmurHash3
extends Hash

This is a very fast, non-cryptographic hash suitable for general hash-based lookup. See http://code.google.com/p/smhasher/wiki/MurmurHash3 for details.

MurmurHash3 is the successor to MurmurHash2. It comes in 3 variants, and the 32-bit version targets low latency for hash table use.


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.util.Hash
INVALID_HASH, JENKINS_HASH, MURMUR_HASH, MURMUR_HASH3
 
Constructor Summary
MurmurHash3()
           
 
Method Summary
static Hash getInstance()
           
 int hash(byte[] bytes, int offset, int length, int initval)
          Returns the MurmurHash3_x86_32 hash.
 
Methods inherited from class org.apache.hadoop.hbase.util.Hash
getHashType, getInstance, getInstance, hash, hash, hash, parseHashType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MurmurHash3

public MurmurHash3()
Method Detail

getInstance

public static Hash getInstance()

hash

public int hash(byte[] bytes,
                int offset,
                int length,
                int initval)
Returns the MurmurHash3_x86_32 hash.

Specified by:
hash in class Hash
Parameters:
bytes - input bytes
offset - the offset into the array to start consideration
length - length of the valid bytes after offset to consider
initval - seed value
Returns:
hash value


Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.