Class MetricsTableAggregateSourceImpl
java.lang.Object
org.apache.hadoop.hbase.metrics.BaseSourceImpl
org.apache.hadoop.hbase.regionserver.MetricsTableAggregateSourceImpl
- All Implemented Interfaces:
BaseSource
,MetricsTableAggregateSource
,org.apache.hadoop.metrics2.MetricsSource
@Private
public class MetricsTableAggregateSourceImpl
extends BaseSourceImpl
implements MetricsTableAggregateSource
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private ConcurrentHashMap<String,
MetricsTableSource> Fields inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
metricsAdapter, metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry, registry
Fields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAME
Fields inherited from interface org.apache.hadoop.hbase.regionserver.MetricsTableAggregateSource
METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME, NUM_TABLES, NUMBER_OF_TABLES_DESC
-
Constructor Summary
ConstructorDescriptionMetricsTableAggregateSourceImpl
(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteTableSource
(String table) Remove a table's source.void
getMetrics
(org.apache.hadoop.metrics2.MetricsCollector collector, boolean all) Yes this is a get function that doesn't return anything.getOrCreateTableSource
(String table, MetricsTableWrapperAggregate wrapper) Returns MetricsTableSource registered for the table.Methods inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
decGauge, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, getMetricsRegistry, incCounters, incGauge, init, removeMetric, setGauge, updateHistogram
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
decGauge, getMetricRegistryInfo, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, init, removeMetric, setGauge, updateHistogram
-
Field Details
-
LOG
-
tableSources
-
-
Constructor Details
-
MetricsTableAggregateSourceImpl
public MetricsTableAggregateSourceImpl() -
MetricsTableAggregateSourceImpl
public MetricsTableAggregateSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext)
-
-
Method Details
-
deleteTableSource
Description copied from interface:MetricsTableAggregateSource
Remove a table's source. This is called when regions of a table are closed.- Specified by:
deleteTableSource
in interfaceMetricsTableAggregateSource
- Parameters:
table
- The table name
-
getOrCreateTableSource
public MetricsTableSource getOrCreateTableSource(String table, MetricsTableWrapperAggregate wrapper) Description copied from interface:MetricsTableAggregateSource
Returns MetricsTableSource registered for the table. Creates one if not defined.- Specified by:
getOrCreateTableSource
in interfaceMetricsTableAggregateSource
- Parameters:
table
- The table name
-
getMetrics
Yes this is a get function that doesn't return anything. Thanks Hadoop for breaking all expectations of java programmers. Instead of returning anything Hadoop metrics expects getMetrics to push the metrics into the collector.- Specified by:
getMetrics
in interfaceorg.apache.hadoop.metrics2.MetricsSource
- Overrides:
getMetrics
in classBaseSourceImpl
- Parameters:
collector
- the collectorall
- get all the metrics regardless of when they last changed.
-