org.apache.hadoop.hbase.regionserver
Class MetricsRegionAggregateSourceImpl

java.lang.Object
  extended by org.apache.hadoop.hbase.metrics.BaseSourceImpl
      extended by org.apache.hadoop.hbase.regionserver.MetricsRegionAggregateSourceImpl
All Implemented Interfaces:
BaseSource, MetricsRegionAggregateSource, org.apache.hadoop.metrics2.MetricsSource

public class MetricsRegionAggregateSourceImpl
extends BaseSourceImpl
implements MetricsRegionAggregateSource


Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.metrics.BaseSourceImpl
metricsContext, metricsDescription, metricsJmxContext, metricsName, metricsRegistry
 
Fields inherited from interface org.apache.hadoop.hbase.regionserver.MetricsRegionAggregateSource
METRICS_CONTEXT, METRICS_DESCRIPTION, METRICS_JMX_CONTEXT, METRICS_NAME
 
Fields inherited from interface org.apache.hadoop.hbase.metrics.BaseSource
HBASE_METRICS_SYSTEM_NAME
 
Constructor Summary
MetricsRegionAggregateSourceImpl()
           
MetricsRegionAggregateSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext)
           
 
Method Summary
 void deregister(MetricsRegionSource source)
          Remove a region's source.
 void getMetrics(org.apache.hadoop.metrics2.MetricsBuilder metricsBuilder, 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, updateQuantile
 
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, getMetricsContext, getMetricsDescription, getMetricsJmxContext, getMetricsName, incCounters, incGauge, init, removeMetric, setGauge, updateHistogram, updateQuantile
 

Constructor Detail

MetricsRegionAggregateSourceImpl

public MetricsRegionAggregateSourceImpl()

MetricsRegionAggregateSourceImpl

public MetricsRegionAggregateSourceImpl(String metricsName,
                                        String metricsDescription,
                                        String metricsContext,
                                        String metricsJmxContext)
Method Detail

register

public void register(MetricsRegionSource source)
Description copied from interface: MetricsRegionAggregateSource
Register a MetricsRegionSource as being open.

Specified by:
register in interface MetricsRegionAggregateSource
Parameters:
source - the source for the region being opened.

deregister

public void deregister(MetricsRegionSource source)
Description copied from interface: MetricsRegionAggregateSource
Remove a region's source. This is called when a region is closed.

Specified by:
deregister in interface MetricsRegionAggregateSource
Parameters:
source - The region to remove.

getMetrics

public void getMetrics(org.apache.hadoop.metrics2.MetricsBuilder metricsBuilder,
                       boolean all)
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 metricsBuilder.

Specified by:
getMetrics in interface org.apache.hadoop.metrics2.MetricsSource
Overrides:
getMetrics in class BaseSourceImpl
Parameters:
metricsBuilder - Builder to accept metrics
all - push all or only changed?


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.