Class HyperLogLog

java.lang.Object
io.airlift.stats.cardinality.HyperLogLog

public class HyperLogLog extends Object
  • Method Details

    • newInstance

      public static HyperLogLog newInstance(int numberOfBuckets)
    • newInstance

      public static HyperLogLog newInstance(io.airlift.slice.Slice serialized)
    • add

      public void add(long value)
    • add

      public void add(io.airlift.slice.Slice value)
    • addHash

      public void addHash(long hash)
      Adds a value that has already been hashed to the set of values tracked by this HyperLogLog instance.
      Parameters:
      hash - The hash should be the 64 least significant bits of the murmur3_128 hash of the value. For example: io.airlift.slice.Murmur3.hash64(value).
    • mergeWith

      public void mergeWith(HyperLogLog other)
    • cardinality

      public long cardinality()
    • estimatedInMemorySize

      public int estimatedInMemorySize()
    • estimatedSerializedSize

      public int estimatedSerializedSize()
    • serialize

      public io.airlift.slice.Slice serialize()
    • makeDense

      public void makeDense()