Class MetricsRegistry
java.lang.Object
com.mapr.org.apache.hadoop.metrics.util.MetricsRegistry
This is the registry for metrics.
Related set of metrics should be declared in a holding class and registered
in a registry for those metrics which is also stored in the the holding class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(String metricsName, MetricsBase theMetricsObj) Add a new metrics to the registryintsize()
-
Constructor Details
-
MetricsRegistry
public MetricsRegistry()
-
-
Method Details
-
size
public int size()- Returns:
- number of metrics in the registry
-
add
Add a new metrics to the registry- Parameters:
metricsName- - the nametheMetricsObj- - the metrics- Throws:
IllegalArgumentException- if a name is already registered
-
get
- Parameters:
metricsName-- Returns:
- the metrics if there is one registered by the supplied name. Returns null if none is registered
-
getKeyList
- Returns:
- the list of metrics names
-
getMetricsList
- Returns:
- the list of metrics
-