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
FieldsModifier and TypeFieldDescriptionprivate final MetricsExecutorImplprivate static final org.slf4j.Loggerprivate final Set<MetricsRegionSource>Fields inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
metricsAdapter, metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry, registryFields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAMEFields inherited from interface org.apache.hadoop.hbase.regionserver.MetricsRegionAggregateSource
METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME -
Constructor Summary
ConstructorsConstructorDescriptionMetricsRegionAggregateSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidderegister(MetricsRegionSource toRemove) Remove a region's source.voidgetMetrics(org.apache.hadoop.metrics2.MetricsCollector collector, boolean all) Yes this is a get function that doesn't return anything.voidregister(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, updateHistogramMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:MetricsRegionAggregateSourceRegister a MetricsRegionSource as being open.- Specified by:
registerin interfaceMetricsRegionAggregateSource- Parameters:
source- the source for the region being opened.
-
deregister
Description copied from interface:MetricsRegionAggregateSourceRemove a region's source. This is called when a region is closed.- Specified by:
deregisterin 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:
getMetricsin interfaceorg.apache.hadoop.metrics2.MetricsSource- Overrides:
getMetricsin classBaseSourceImpl- Parameters:
collector- the collectorall- get all the metrics regardless of when they last changed.
-