@InterfaceAudience.Public @InterfaceStability.Evolving public class MutableQuantiles extends MutableMetric
Modifier and Type | Field and Description |
---|---|
protected Map<org.apache.hadoop.metrics2.util.Quantile,Long> |
previousSnapshot |
static org.apache.hadoop.metrics2.util.Quantile[] |
quantiles |
Constructor and Description |
---|
MutableQuantiles(String name,
String description,
String sampleName,
String valueName,
int interval)
Instantiates a new
MutableQuantiles for a metric that rolls itself
over on the specified time interval. |
Modifier and Type | Method and Description |
---|---|
void |
add(long value) |
int |
getInterval() |
void |
snapshot(MetricsRecordBuilder builder,
boolean all)
Get a snapshot of the metric
|
changed, clearChanged, setChanged, snapshot
public static final org.apache.hadoop.metrics2.util.Quantile[] quantiles
protected Map<org.apache.hadoop.metrics2.util.Quantile,Long> previousSnapshot
public MutableQuantiles(String name, String description, String sampleName, String valueName, int interval)
MutableQuantiles
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(MetricsRecordBuilder builder, boolean all)
MutableMetric
snapshot
in class MutableMetric
builder
- the metrics record builderall
- if true, snapshot unchanged metrics as wellpublic void add(long value)
public int getInterval()
Copyright © 2015 Apache Software Foundation. All rights reserved.