org.apache.hadoop.hbase.util
Class MurmurHash3
java.lang.Object
org.apache.hadoop.hbase.util.Hash
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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MurmurHash3
public MurmurHash3()
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 bytesoffset
- the offset into the array to start considerationlength
- length of the valid bytes after offset to considerinitval
- seed value
- Returns:
- hash value
Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.