|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.metrics2.lib.MutableMetric
org.apache.hadoop.metrics2.lib.MutableStat
@InterfaceAudience.Public @InterfaceStability.Evolving public class MutableStat
A mutable metric with stats. Useful for keeping throughput/latency stats.
| Constructor Summary | |
|---|---|
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 |
|
| Method Summary | |
|---|---|
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 |
void |
resetMinMax()
Reset the all time min max of the metric |
void |
snapshot(MetricsRecordBuilder builder,
boolean all)
Get a snapshot of the metric |
| Methods inherited from class org.apache.hadoop.metrics2.lib.MutableMetric |
|---|
changed, clearChanged, setChanged, snapshot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public 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")| Method Detail |
|---|
public void add(long numSamples,
long sum)
numSamples - number of samplessum - of the samplespublic void add(long value)
value - of the metric
public void snapshot(MetricsRecordBuilder builder,
boolean all)
MutableMetric
snapshot in class MutableMetricbuilder - the metrics record builderall - if true, snapshot unchanged metrics as wellpublic void resetMinMax()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||