Package org.apache.hadoop.metrics2.impl
Class MetricsRecordImpl
java.lang.Object
org.apache.hadoop.metrics2.impl.MetricsRecordImpl
- All Implemented Interfaces:
MetricsRecord
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMetricsRecordImpl(MetricsInfo info, long timestamp, List<MetricsTag> tags, Iterable<AbstractMetric> metrics) Construct a metrics record -
Method Summary
Modifier and TypeMethodDescriptioncontext()booleaninthashCode()metrics()Get the metrics of the recordname()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 mapslongGet the timestamp of the metricstoString()
-
Field Details
-
DEFAULT_CONTEXT
- See Also:
-
-
Constructor Details
-
MetricsRecordImpl
public MetricsRecordImpl(MetricsInfo info, long timestamp, List<MetricsTag> tags, Iterable<AbstractMetric> metrics) Construct a metrics record- Parameters:
info-MetricsInfoof the recordtimestamp- of the recordtags- of the recordmetrics- of the record
-
-
Method Details
-
timestamp
public long timestamp()Description copied from interface:MetricsRecordGet the timestamp of the metrics- Returns:
- the timestamp
-
name
- Returns:
- the metrics record name
-
description
- Returns:
- the description of the metrics record
-
context
- Returns:
- the context name of the metrics record
-
tags
Description copied from interface:MetricsRecordGet 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
Description copied from interface:MetricsRecordGet the metrics of the record- Returns:
- an immutable iterable interface for metrics
-
equals
-
hashCode
public int hashCode() -
toString
-