@InterfaceAudience.Public @InterfaceStability.Evolving public class MutableStat extends MutableMetric
| コンストラクタと説明 | 
|---|
| MutableStat(String name,
           String description,
           String sampleName,
           String valueName)Construct a snapshot stat metric with extended stat off by default | 
| MutableStat(String name,
           String description,
           String sampleName,
           String valueName,
           boolean extended)Construct a sample statistics metric | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| void | add(long value)Add a snapshot to the metric | 
| void | add(long numSamples,
   long sum)Add a number of samples and their sum to the running stat | 
| org.apache.hadoop.metrics2.util.SampleStat | lastStat()Return a SampleStat object that supports
 calls like StdDev and Mean. | 
| void | resetMinMax()Reset the all time min max of the metric | 
| void | setExtended(boolean extended)Set whether to display the extended stats (stdev, min/max etc.) or not | 
| void | snapshot(MetricsRecordBuilder builder,
        boolean all)Get a snapshot of the metric | 
| String | toString() | 
changed, clearChanged, setChanged, snapshotpublic MutableStat(String name, String description, String sampleName, String valueName, boolean extended)
name - of the metricdescription - of the metricsampleName - of the metric (e.g. "Ops")valueName - of the metric (e.g. "Time", "Latency")extended - create extended stats (stdev, min/max etc.) by default.public MutableStat(String name, String description, String sampleName, String valueName)
name - of the metricdescription - of the metricsampleName - of the metric (e.g. "Ops")valueName - of the metric (e.g. "Time", "Latency")public void setExtended(boolean extended)
extended - enable/disable displaying extended statspublic void add(long numSamples, long sum)
numSamples - number of samplessum - of the samplespublic void add(long value)
value - of the metricpublic void snapshot(MetricsRecordBuilder builder, boolean all)
MutableMetricsnapshot クラス内 MutableMetricbuilder - the metrics record builderall - if true, snapshot unchanged metrics as wellpublic org.apache.hadoop.metrics2.util.SampleStat lastStat()
public void resetMinMax()
Copyright © 2016 Apache Software Foundation. All rights reserved.