@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 |
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 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.