Class MetricsRegionAggregateSourceImpl
java.lang.Object
org.apache.hadoop.hbase.metrics.BaseSourceImpl
org.apache.hadoop.hbase.regionserver.MetricsRegionAggregateSourceImpl
- All Implemented Interfaces:
BaseSource
,MetricsRegionAggregateSource
,org.apache.hadoop.metrics2.MetricsSource
@Private
public class MetricsRegionAggregateSourceImpl
extends BaseSourceImpl
implements MetricsRegionAggregateSource
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MetricsExecutorImpl
private static final org.slf4j.Logger
private final Set<MetricsRegionSource>
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.MetricsRegionAggregateSource
METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME
-
Constructor Summary
ConstructorDescriptionMetricsRegionAggregateSourceImpl
(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
deregister
(MetricsRegionSource toRemove) Remove a region's source.void
getMetrics
(org.apache.hadoop.metrics2.MetricsCollector collector, boolean all) Yes this is a get function that doesn't return anything.void
register
(MetricsRegionSource source) Register a MetricsRegionSource as being open.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
-
executor
-
regionSources
-
-
Constructor Details
-
MetricsRegionAggregateSourceImpl
public MetricsRegionAggregateSourceImpl() -
MetricsRegionAggregateSourceImpl
public MetricsRegionAggregateSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext)
-
-
Method Details
-
register
Description copied from interface:MetricsRegionAggregateSource
Register a MetricsRegionSource as being open.- Specified by:
register
in interfaceMetricsRegionAggregateSource
- Parameters:
source
- the source for the region being opened.
-
deregister
Description copied from interface:MetricsRegionAggregateSource
Remove a region's source. This is called when a region is closed.- Specified by:
deregister
in interfaceMetricsRegionAggregateSource
- Parameters:
toRemove
- The region to remove.
-
clearCache
-
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.
-