Class GlobalMetricRegistriesAdapter
Developer note: 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
HBaseMetrics2HadoopMetricsAdapter.snapshotAllMetrics(MetricRegistry, MetricsCollector)
.
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MetricsExecutor
private final DefaultMetricsSystemHelper
private static final org.slf4j.Logger
private final HBaseMetrics2HadoopMetricsAdapter
private final AtomicBoolean
-
Constructor Summary
-
Method Summary
-
Field Details
-
LOG
-
executor
-
stopped
-
helper
-
metricsAdapter
-
registeredSources
-
-
Constructor Details
-
GlobalMetricRegistriesAdapter
private GlobalMetricRegistriesAdapter()
-
-
Method Details
-
init
Make sure that this global MetricSource for hbase-metrics module based metrics are initialized. This should be called only once. -
stop
-
doRun
-