Class FixedReservoirHistogram

java.lang.Object
org.apache.iceberg.metrics.FixedReservoirHistogram
All Implemented Interfaces:
Histogram

public class FixedReservoirHistogram extends Object implements Histogram
A Histogram implementation with reservoir sampling.
  • Constructor Details Link icon

    • FixedReservoirHistogram Link icon

      public FixedReservoirHistogram(int reservoirSize)
  • Method Details Link icon

    • count Link icon

      public int count()
      Description copied from interface: Histogram
      Return the number of observations.
      Specified by:
      count in interface Histogram
    • update Link icon

      public void update(long value)
      Description copied from interface: Histogram
      Update the histogram with a new value observed.
      Specified by:
      update in interface Histogram
    • statistics Link icon

      public Histogram.Statistics statistics()
      Naive algorithm for calculating variance: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
      Specified by:
      statistics in interface Histogram