org.apache.hadoop.metrics2.lib
Class MetricMutableHistogram

java.lang.Object
  extended by org.apache.hadoop.metrics2.lib.MetricMutable
      extended by org.apache.hadoop.metrics2.lib.MetricMutableHistogram
All Implemented Interfaces:
MetricHistogram
Direct Known Subclasses:
MetricMutableRangeHistogram

public class MetricMutableHistogram
extends org.apache.hadoop.metrics2.lib.MetricMutable
implements MetricHistogram

A histogram implementation that runs in constant space, and exports to hadoop's metrics2 system.


Field Summary
 
Fields inherited from class org.apache.hadoop.metrics2.lib.MetricMutable
description, name
 
Fields inherited from interface org.apache.hadoop.metrics2.MetricHistogram
MAX_METRIC_NAME, MEAN_METRIC_NAME, MEDIAN_METRIC_NAME, MIN_METRIC_NAME, NINETIETH_PERCENTILE_METRIC_NAME, NINETY_FIFTH_PERCENTILE_METRIC_NAME, NINETY_NINETH_PERCENTILE_METRIC_NAME, NUM_OPS_METRIC_NAME, SEVENTY_FIFTH_PERCENTILE_METRIC_NAME
 
Constructor Summary
MetricMutableHistogram(String name, String description)
           
 
Method Summary
 void add(long val)
          Add a single value to a histogram's stream of values.
 long getMax()
           
 double getMean()
           
 long getMin()
           
 void snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder, boolean all)
           
 void updateSnapshotMetrics(org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder)
           
 
Methods inherited from class org.apache.hadoop.metrics2.lib.MetricMutable
changed, clearChanged, setChanged, snapshot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetricMutableHistogram

public MetricMutableHistogram(String name,
                              String description)
Method Detail

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

getMax

public long getMax()

getMin

public long getMin()

getMean

public double getMean()

snapshot

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

updateSnapshotMetrics

public void updateSnapshotMetrics(org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder)


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.