Package org.apache.hadoop.metrics2
Interface MetricsRecord
@Public
@Evolving
public interface MetricsRecord
An immutable snapshot of metrics with a timestamp
-
Method Summary
-
Method Details
-
timestamp
long timestamp()Get the timestamp of the metrics- Returns:
- the timestamp
-
name
String name()- Returns:
- the metrics record name
-
description
String description()- Returns:
- the description of the metrics record
-
context
String context()- Returns:
- the context name of the metrics record
-
tags
Collection<MetricsTag> tags()Get the tags of the record Note: returning a collection instead of iterable as we need to use tags as keys (hence Collection#hashCode etc.) in maps- Returns:
- an unmodifiable collection of tags
-
metrics
Iterable<AbstractMetric> metrics()Get the metrics of the record- Returns:
- an immutable iterable interface for metrics
-