@InterfaceAudience.Public @InterfaceStability.Evolving public class MutableRatesWithAggregation extends MutableMetric
MutableRates
. See HADOOP-24420.Constructor and Description |
---|
MutableRatesWithAggregation() |
Modifier and Type | Method and Description |
---|---|
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 |
init(Class<?> protocol,
String prefix) |
void |
init(String[] names)
Initialize the registry with all rate names passed in.
|
void |
snapshot(MetricsRecordBuilder rb,
boolean all)
Get a snapshot of the metric
|
changed, clearChanged, setChanged, snapshot
public void init(Class<?> protocol)
protocol
- the protocol classpublic void init(String[] names)
names
- the array of all rate namespublic 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 wellCopyright © 2021 Apache Software Foundation. All rights reserved.