@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)  | 
QuantileEstimator | 
getEstimator()
Get the quantile estimator. 
 | 
int | 
getInterval()  | 
void | 
setEstimator(QuantileEstimator quantileEstimator)  | 
void | 
snapshot(MetricsRecordBuilder builder,
        boolean all)
Get a snapshot of the metric 
 | 
void | 
stop()  | 
changed, clearChanged, setChanged, snapshotpublic 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)
MutableMetricsnapshot in class MutableMetricbuilder - the metrics record builderall - if true, snapshot unchanged metrics as wellpublic void add(long value)
public int getInterval()
public void stop()
public QuantileEstimator getEstimator()
public void setEstimator(QuantileEstimator quantileEstimator)
Copyright © 2018 Apache Software Foundation. All Rights Reserved.