public class HyperLogLogHash extends Object
HyperLogLogCollector.add(byte[])
requires hashed value on input. This class makes it easier to achieve
consistent value hashing for both internal aggregation and external hashing for pre-computed aggregation.
By default 128-bit murmur3 algorithm, x64 variant is used. Implementation is thread safe.
Caution! changing of implementation may cause improper cardinality estimation between data hashed with different versions.
Constructor and Description |
---|
HyperLogLogHash(com.google.common.hash.HashFunction hashFunction) |
Modifier and Type | Method and Description |
---|---|
static HyperLogLogHash |
getDefault() |
byte[] |
hash(byte[] rawValue) |
byte[] |
hash(String rawValue) |
public HyperLogLogHash(com.google.common.hash.HashFunction hashFunction)
public static HyperLogLogHash getDefault()
public byte[] hash(byte[] rawValue)
public byte[] hash(String rawValue)
Copyright © 2011–2017. All rights reserved.