|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase
org.apache.hadoop.metrics2
usage.
@Deprecated @InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) public abstract class MetricsDynamicMBeanBase
This abstract base class facilitates creating dynamic mbeans automatically from metrics. The metrics constructors registers metrics in a registry. Different categories of metrics should be in differnt classes with their own registry (as in NameNodeMetrics and DataNodeMetrics). Then the MBean can be created passing the registry to the constructor. The MBean should be then registered using a mbean name (example): MetricsHolder myMetrics = new MetricsHolder(); // has metrics and registry MetricsTestMBean theMBean = new MetricsTestMBean(myMetrics.mregistry); ObjectName mbeanName = MBeanUtil.registerMBean("ServiceFoo", "TestStatistics", theMBean);
Constructor Summary | |
---|---|
protected |
MetricsDynamicMBeanBase(MetricsRegistry mr,
String aMBeanDescription)
Deprecated. |
Method Summary | |
---|---|
Object |
getAttribute(String attributeName)
Deprecated. |
AttributeList |
getAttributes(String[] attributeNames)
Deprecated. |
MBeanInfo |
getMBeanInfo()
Deprecated. |
Object |
invoke(String actionName,
Object[] parms,
String[] signature)
Deprecated. |
void |
setAttribute(Attribute attribute)
Deprecated. |
AttributeList |
setAttributes(AttributeList attributes)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MetricsDynamicMBeanBase(MetricsRegistry mr, String aMBeanDescription)
Method Detail |
---|
public Object getAttribute(String attributeName) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute
in interface DynamicMBean
AttributeNotFoundException
MBeanException
ReflectionException
public AttributeList getAttributes(String[] attributeNames)
getAttributes
in interface DynamicMBean
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public Object invoke(String actionName, Object[] parms, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
MBeanException
ReflectionException
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface DynamicMBean
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
public AttributeList setAttributes(AttributeList attributes)
setAttributes
in interface DynamicMBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |