@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) |
org.apache.hadoop.metrics2.util.QuantileEstimator |
getEstimator()
Get the quantile estimator.
|
int |
getInterval() |
void |
setEstimator(org.apache.hadoop.metrics2.util.QuantileEstimator quantileEstimator) |
void |
snapshot(MetricsRecordBuilder builder,
boolean all)
Get a snapshot of the metric
|
void |
stop() |
changed, clearChanged, setChanged, snapshot
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()
public void stop()
public org.apache.hadoop.metrics2.util.QuantileEstimator getEstimator()
public void setEstimator(org.apache.hadoop.metrics2.util.QuantileEstimator quantileEstimator)
Copyright © 2021 Apache Software Foundation. All rights reserved.