org.apache.hadoop.hdfs.server.datanode.metrics
Class DataNodeActivityMBean
java.lang.Object
org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase
org.apache.hadoop.hdfs.server.datanode.metrics.DataNodeActivityMBean
- All Implemented Interfaces:
- DynamicMBean
@InterfaceAudience.Private
public class DataNodeActivityMBean
- extends org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase
This is the JMX MBean for reporting the DataNode Activity.
The MBean is register using the name
"hadoop:service=DataNode,name=DataNodeActivity--"
Many of the activity metrics are sampled and averaged on an interval
which can be specified in the metrics config file.
For the metrics that are sampled and averaged, one must specify
a metrics context that does periodic update calls. Most metrics contexts do.
The default Null metrics context however does NOT. So if you aren't
using any other metrics context then you can turn on the viewing and averaging
of sampled metrics by specifying the following two lines
in the hadoop-meterics.properties file:
dfs.class=org.apache.hadoop.metrics.spi.NullContextWithUpdateThread
dfs.period=10
Note that the metrics are collected regardless of the context used.
The context with the update thread is used to average the data periodically
Impl details: We use a dynamic mbean that gets the list of the metrics
from the metrics registry passed as an argument to the constructor
Methods inherited from class org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase |
getAttribute, getAttributes, getMBeanInfo, invoke, setAttribute, setAttributes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataNodeActivityMBean
public DataNodeActivityMBean(org.apache.hadoop.metrics.util.MetricsRegistry mr,
String datanodeName)
shutdown
public void shutdown()
Copyright © 2009 The Apache Software Foundation