Package org.apache.druid.hll
Class HyperLogLogHash
- java.lang.Object
-
- org.apache.druid.hll.HyperLogLogHash
-
public class HyperLogLogHash extends Object
Contains data hashing methods used before applying Hyper Log Log.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 Summary
Constructors Constructor Description HyperLogLogHash(com.google.common.hash.HashFunction hashFunction)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HyperLogLogHash
getDefault()
byte[]
hash(byte[] rawValue)
byte[]
hash(String rawValue)
-
-
-
Method Detail
-
getDefault
public static HyperLogLogHash getDefault()
-
hash
public byte[] hash(byte[] rawValue)
-
hash
public byte[] hash(String rawValue)
-
-