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:
javax.management.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  java.lang.String description
           
protected  java.util.Map<java.lang.String,org.apache.hadoop.metrics.util.MetricsBase> extendedAttributes
          HBase MetricsBase implementations that MetricsDynamicMBeanBase does not understand
protected  javax.management.MBeanInfo extendedInfo
           
protected  org.apache.hadoop.metrics.util.MetricsRegistry registry
           
protected  int registryLength
           
 
Constructor Summary
protected MetricsMBeanBase(org.apache.hadoop.metrics.util.MetricsRegistry mr, java.lang.String description)
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
           
 javax.management.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 java.lang.String description

registryLength

protected int registryLength

extendedAttributes

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


extendedInfo

protected javax.management.MBeanInfo extendedInfo
Constructor Detail

MetricsMBeanBase

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

init

protected void init()

getAttribute

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

getMBeanInfo

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


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