@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class AbstractMetric extends Object implements MetricsInfo
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMetric(MetricsInfo info)
Construct the metric
|
| Modifier and Type | Method and Description |
|---|---|
String |
description()
Typically the description corresponds to annotation
Metric.about()
or the name of the class. |
boolean |
equals(Object obj) |
int |
hashCode() |
protected MetricsInfo |
info() |
String |
name()
Typically name corresponds to annotation
Metric.value() or
the name of the class. |
String |
toString() |
abstract org.apache.hadoop.metrics2.MetricType |
type()
Get the type of the metric
|
abstract Number |
value()
Get the value of the metric
|
abstract void |
visit(MetricsVisitor visitor)
Accept a visitor interface
|
protected AbstractMetric(MetricsInfo info)
info - about the metricpublic String name()
MetricsInfoMetric.value() or
the name of the class.name in interface MetricsInfopublic String description()
MetricsInfoMetric.about()
or the name of the class.description in interface MetricsInfoprotected MetricsInfo info()
public abstract Number value()
public abstract org.apache.hadoop.metrics2.MetricType type()
public abstract void visit(MetricsVisitor visitor)
visitor - of the metricCopyright © 2022 Apache Software Foundation. All rights reserved.