|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.metrics2.MetricsRecordBuilder
@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class MetricsRecordBuilder
The metrics record builder interface
Constructor Summary | |
---|---|
MetricsRecordBuilder()
|
Method Summary | |
---|---|
abstract MetricsRecordBuilder |
add(AbstractMetric metric)
Add a pre-made immutable metric object |
abstract MetricsRecordBuilder |
add(MetricsTag tag)
Add an immutable metrics tag object |
abstract MetricsRecordBuilder |
addCounter(MetricsInfo info,
int value)
Add an integer metric |
abstract MetricsRecordBuilder |
addCounter(MetricsInfo info,
long value)
Add an long metric |
abstract MetricsRecordBuilder |
addGauge(MetricsInfo info,
double value)
Add a double gauge metric |
abstract MetricsRecordBuilder |
addGauge(MetricsInfo info,
float value)
Add a float gauge metric |
abstract MetricsRecordBuilder |
addGauge(MetricsInfo info,
int value)
Add a integer gauge metric |
abstract MetricsRecordBuilder |
addGauge(MetricsInfo info,
long value)
Add a long gauge metric |
MetricsCollector |
endRecord()
Syntactic sugar to add multiple records in a collector in a one liner. |
abstract MetricsCollector |
parent()
|
abstract MetricsRecordBuilder |
setContext(String value)
Set the context tag |
abstract MetricsRecordBuilder |
tag(MetricsInfo info,
String value)
Add a metrics tag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetricsRecordBuilder()
Method Detail |
---|
public abstract MetricsRecordBuilder tag(MetricsInfo info, String value)
info
- metadata of the tagvalue
- of the tag
public abstract MetricsRecordBuilder add(MetricsTag tag)
tag
- a pre-made tag object (potentially save an object construction)
public abstract MetricsRecordBuilder add(AbstractMetric metric)
metric
- the pre-made metric to save an object construction
public abstract MetricsRecordBuilder setContext(String value)
value
- of the context
public abstract MetricsRecordBuilder addCounter(MetricsInfo info, int value)
info
- metadata of the metricvalue
- of the metric
public abstract MetricsRecordBuilder addCounter(MetricsInfo info, long value)
info
- metadata of the metricvalue
- of the metric
public abstract MetricsRecordBuilder addGauge(MetricsInfo info, int value)
info
- metadata of the metricvalue
- of the metric
public abstract MetricsRecordBuilder addGauge(MetricsInfo info, long value)
info
- metadata of the metricvalue
- of the metric
public abstract MetricsRecordBuilder addGauge(MetricsInfo info, float value)
info
- metadata of the metricvalue
- of the metric
public abstract MetricsRecordBuilder addGauge(MetricsInfo info, double value)
info
- metadata of the metricvalue
- of the metric
public abstract MetricsCollector parent()
public MetricsCollector endRecord()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |