Package org.apache.hadoop.metrics2
Class AbstractMetric
java.lang.Object
org.apache.hadoop.metrics2.AbstractMetric
- All Implemented Interfaces:
MetricsInfo
The immutable metric
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTypically the description corresponds to annotationMetric.about()or the name of the class.booleaninthashCode()protected MetricsInfoinfo()name()Typically name corresponds to annotationMetric.value()or the name of the class.toString()abstract MetricTypetype()Get the type of the metricabstract Numbervalue()Get the value of the metricabstract voidvisit(MetricsVisitor visitor) Accept a visitor interface
-
Constructor Details
-
AbstractMetric
Construct the metric- Parameters:
info- about the metric
-
-
Method Details
-
name
Description copied from interface:MetricsInfoTypically name corresponds to annotationMetric.value()or the name of the class.- Specified by:
namein interfaceMetricsInfo- Returns:
- the name of the metric/tag
-
description
Description copied from interface:MetricsInfoTypically the description corresponds to annotationMetric.about()or the name of the class.- Specified by:
descriptionin interfaceMetricsInfo- Returns:
- the description of the metric/tag
-
info
-
value
Get the value of the metric- Returns:
- the value of the metric
-
type
Get the type of the metric- Returns:
- the type of the metric
-
visit
Accept a visitor interface- Parameters:
visitor- of the metric
-
equals
-
hashCode
public int hashCode() -
toString
-