org.apache.hadoop.hbase.metrics
Class MetricsMBeanBase

java.lang.Object
  extended by org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase
      extended by org.apache.hadoop.hbase.metrics.MetricsMBeanBase
All Implemented Interfaces:
DynamicMBean
Direct Known Subclasses:
HBaseInfo.HBaseInfoMBean, MasterStatistics, RegionServerStatistics, ReplicationStatistics, RESTStatistics

public class MetricsMBeanBase
extends org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase

Extends the Hadoop MetricsDynamicMBeanBase class to provide JMX support for custom HBase MetricsBase implementations. MetricsDynamicMBeanBase ignores registered MetricsBase instance that are not instances of one of the org.apache.hadoop.metrics.util implementations.


Field Summary
protected  String description
           
protected  Map<String,org.apache.hadoop.metrics.util.MetricsBase> extendedAttributes
          HBase MetricsBase implementations that MetricsDynamicMBeanBase does not understand
protected  MBeanInfo extendedInfo
           
protected  org.apache.hadoop.metrics.util.MetricsRegistry registry
           
protected  int registryLength
           
 
Constructor Summary
protected MetricsMBeanBase(org.apache.hadoop.metrics.util.MetricsRegistry mr, String description)
           
 
Method Summary
 Object getAttribute(String name)
           
 MBeanInfo getMBeanInfo()
           
protected  void init()
           
 
Methods inherited from class org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase
getAttributes, invoke, setAttribute, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registry

protected final org.apache.hadoop.metrics.util.MetricsRegistry registry

description

protected final String description

registryLength

protected int registryLength

extendedAttributes

protected Map<String,org.apache.hadoop.metrics.util.MetricsBase> extendedAttributes
HBase MetricsBase implementations that MetricsDynamicMBeanBase does not understand


extendedInfo

protected MBeanInfo extendedInfo
Constructor Detail

MetricsMBeanBase

protected MetricsMBeanBase(org.apache.hadoop.metrics.util.MetricsRegistry mr,
                           String description)
Method Detail

init

protected void init()

getAttribute

public Object getAttribute(String name)
                    throws AttributeNotFoundException,
                           MBeanException,
                           ReflectionException
Specified by:
getAttribute in interface DynamicMBean
Overrides:
getAttribute in class org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase
Throws:
AttributeNotFoundException
MBeanException
ReflectionException

getMBeanInfo

public MBeanInfo getMBeanInfo()
Specified by:
getMBeanInfo in interface DynamicMBean
Overrides:
getMBeanInfo in class org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.