|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.metrics2.lib.MutableMetric org.apache.hadoop.metrics2.lib.MutableRates
@InterfaceAudience.Public @InterfaceStability.Evolving public class MutableRates
Helper class to manage a group of mutable rate metrics
Method Summary | |
---|---|
void |
add(String name,
long elapsed)
Add a rate sample for a rate metric |
void |
init(Class<?> protocol)
Initialize the registry with all the methods in a protocol so they all show up in the first snapshot. |
void |
snapshot(MetricsRecordBuilder rb,
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 |
Method Detail |
---|
public void init(Class<?> protocol)
protocol
- the protocol classpublic void add(String name, long elapsed)
name
- of the rate metricelapsed
- timepublic void snapshot(MetricsRecordBuilder rb, boolean all)
MutableMetric
snapshot
in class MutableMetric
rb
- the metrics record builderall
- if true, snapshot unchanged metrics as well
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |