RpcActivityMBean (Hadoop 0.20.2-cdh3u5 API)
Date: 2012-10-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.ipc.metrics
Class RpcActivityMBean

    java.lang.Object
      org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase
          org.apache.hadoop.ipc.metrics.RpcActivityMBean

All Implemented Interfaces:
  DynamicMBean

    public class RpcActivityMBean

extends MetricsDynamicMBeanBase

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

            rpc.class=org.apache.hadoop.metrics.spi.NullContextWithUpdateThread
            rpc.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
`RpcActivityMBean(MetricsRegistry mr, String serviceName, String port)`

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

### RpcActivityMBean

    public RpcActivityMBean(MetricsRegistry mr,
                            String serviceName,
                            String port)

Parameters:
  `mr` - - the metrics registry that has all the metrics
  `serviceName` - - the service name for the rpc service
  `port` - - the rpc port.

Method Detail

### shutdown

    public void shutdown()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation