org.apache.hadoop.hbase.util
Class MurmurHash

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

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

This is a very fast, non-cryptographic hash suitable for general hash-based lookup. See http://murmurhash.googlepages.com/ for more details.

The C version of MurmurHash 2.0 found at that site was ported to Java by Andrzej Bialecki (ab at getopt org).


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.util.Hash
INVALID_HASH, JENKINS_HASH, MURMUR_HASH, MURMUR_HASH3
 
Constructor Summary
MurmurHash()
           
 
Method Summary
static Hash getInstance()
           
 int hash(byte[] data, int offset, int length, int seed)
          Calculate a hash using bytes from offset to offset + length, and the provided seed value.
 
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

MurmurHash

public MurmurHash()
Method Detail

getInstance

public static Hash getInstance()

hash

public int hash(byte[] data,
                int offset,
                int length,
                int seed)
Description copied from class: Hash
Calculate a hash using bytes from offset to offset + length, and the provided seed value.

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


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