public class GlobalMetricRegistriesAdapter extends Object
Unlike the current metrics2 based approach, the new metrics approach
(hbase-metrics-api and hbase-metrics modules) work by having different MetricRegistries that are
initialized and used from the code that lives in their respective modules (hbase-server, etc).
There is no need to define BaseSource classes and do a lot of indirection. The MetricRegistry'es
will be in the global MetricRegistriesImpl, and this class will iterate over
MetricRegistries.global() and register adapters to the metrics2 subsystem. These adapters then
report the actual values by delegating to
We do not initialize the Hadoop Metrics2 system assuming that other BaseSources already do so
(see BaseSourceImpl). Once the last BaseSource is moved to the new system, the metric2
initialization should be moved here.
|Modifier and Type||Method and Description|
Make sure that this global MetricSource for hbase-metrics module based metrics are initialized.
Use reflection to unregister the Hadoop metric source, since MetricsSystem#unregisterSource() is only available in Hadoop 2.6+ (HADOOP-10839)
public static GlobalMetricRegistriesAdapter init()
public void stop()
protected void unregisterSource(MetricRegistryInfo info)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.