@InterfaceAudience.Private public class MetricMutableQuantiles extends org.apache.hadoop.metrics2.lib.MutableMetric implements MetricHistogram
Modifier and Type | Class and Description |
---|---|
private static class |
MetricMutableQuantiles.RolloverSample
Runnable used to periodically roll over the internal
MetricSampleQuantiles every interval. |
Modifier and Type | Field and Description |
---|---|
private MetricSampleQuantiles |
estimator |
private MetricsExecutor |
executor |
private int |
interval |
private org.apache.hadoop.metrics2.MetricsInfo |
numInfo |
private long |
previousCount |
protected Map<MetricQuantile,Long> |
previousSnapshot |
private org.apache.hadoop.metrics2.MetricsInfo[] |
quantileInfos |
(package private) static MetricQuantile[] |
quantiles |
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 and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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) |
static final MetricQuantile[] quantiles
private final org.apache.hadoop.metrics2.MetricsInfo numInfo
private final org.apache.hadoop.metrics2.MetricsInfo[] quantileInfos
private final int interval
private MetricSampleQuantiles estimator
private long previousCount
private MetricsExecutor executor
protected Map<MetricQuantile,Long> previousSnapshot
public MetricMutableQuantiles(String name, String description, String sampleName, String valueName, int interval)
MetricMutableQuantiles
for a metric that rolls itself over on the
specified time interval.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 estimatorpublic void snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder builder, boolean all)
snapshot
in class org.apache.hadoop.metrics2.lib.MutableMetric
public void add(long value)
MetricHistogram
add
in interface MetricHistogram
public int getInterval()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.