org.apache.hadoop.metrics2.lib
Class MetricMutableQuantiles
java.lang.Object
org.apache.hadoop.metrics2.lib.MetricMutable
org.apache.hadoop.metrics2.lib.MetricMutableQuantiles
- All Implemented Interfaces:
- MetricHistogram
@InterfaceAudience.Private
public class MetricMutableQuantiles
- extends org.apache.hadoop.metrics2.lib.MetricMutable
- implements MetricHistogram
Watches a stream of long values, maintaining online estimates of specific quantiles with provably
low error bounds. This is particularly useful for accurate high-percentile (e.g. 95th, 99th)
latency metrics.
Fields inherited from class org.apache.hadoop.metrics2.lib.MetricMutable |
description, name |
Method Summary |
void |
add(long value)
Add a single value to a histogram's stream of values. |
int |
getInterval()
|
void |
snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder builder,
boolean all)
|
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 |
previousSnapshot
protected Map<MetricQuantile,Long> previousSnapshot
MetricMutableQuantiles
public MetricMutableQuantiles(String name,
String description,
String sampleName,
String valueName,
int interval)
- Instantiates a new
MetricMutableQuantiles
for a metric that rolls itself over on the
specified time interval.
- Parameters:
name
- of the metricdescription
- long-form textual description of the metricsampleName
- type of items in the stream (e.g., "Ops")valueName
- type of the valuesinterval
- rollover interval (in seconds) of the estimator
MetricMutableQuantiles
public MetricMutableQuantiles(String name,
String description)
snapshot
public void snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder builder,
boolean all)
- Specified by:
snapshot
in class org.apache.hadoop.metrics2.lib.MetricMutable
add
public void add(long value)
- Description copied from interface:
MetricHistogram
- Add a single value to a histogram's stream of values.
- Specified by:
add
in interface MetricHistogram
getInterval
public int getInterval()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.