org.apache.hadoop.hdfs.server.namenode.metrics
Class NameNodeActivityMBean

java.lang.Object
  extended by org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase
      extended by org.apache.hadoop.hdfs.server.namenode.metrics.NameNodeActivityMBean
All Implemented Interfaces:
DynamicMBean

@InterfaceAudience.Private
public class NameNodeActivityMBean
extends org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase

This is the JMX MBean for reporting the NameNode Activity. The MBean is register using the name "hadoop:service=NameNode,name=NameNodeActivity" 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


Constructor Summary
protected NameNodeActivityMBean(org.apache.hadoop.metrics.util.MetricsRegistry mr)
           
 
Method Summary
 void shutdown()
           
 
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
 

Constructor Detail

NameNodeActivityMBean

protected NameNodeActivityMBean(org.apache.hadoop.metrics.util.MetricsRegistry mr)
Method Detail

shutdown

public void shutdown()


Copyright © 2009 The Apache Software Foundation