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

    • FixedReservoirHistogram

      public FixedReservoirHistogram(int reservoirSize)
  • Method Details

    • count

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

      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

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