Class 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 Detail

      • HyperLogLogHash

        public HyperLogLogHash​(com.google.common.hash.HashFunction hashFunction)
    • Method Detail

      • hash

        public byte[] hash​(byte[] rawValue)
      • hash

        public byte[] hash​(String rawValue)