Class MutableHistogram

java.lang.Object
org.apache.hadoop.metrics2.lib.MutableMetric
org.apache.hadoop.metrics2.lib.MutableHistogram
All Implemented Interfaces:
MetricHistogram
Direct Known Subclasses:
MutableRangeHistogram

@Private public class MutableHistogram extends org.apache.hadoop.metrics2.lib.MutableMetric implements MetricHistogram
A histogram implementation that runs in constant space, and exports to hadoop2's metrics2 system.
  • Field Details

  • Constructor Details

  • Method Details

    • add

      public void add(long val)
      Description copied from interface: MetricHistogram
      Add a single value to a histogram's stream of values.
      Specified by:
      add in interface MetricHistogram
    • getCount

      public long getCount()
      Description copied from interface: MetricHistogram
      Return the total number of values added to the histogram.
      Specified by:
      getCount in interface MetricHistogram
      Returns:
      the total number of values.
    • getMax

      public long getMax()
    • snapshot

      public void snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder, boolean all)
      Specified by:
      snapshot in class org.apache.hadoop.metrics2.lib.MutableMetric
    • snapshot

      public static void snapshot(String name, String desc, Histogram histogram, org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder, boolean all)
    • updateSnapshotMetrics

      protected static void updateSnapshotMetrics(String name, String desc, Histogram histogram, Snapshot snapshot, org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder)