org.apache.hadoop.ipc.metrics
Class RpcDetailedActivityMBean
java.lang.Object
org.apache.hadoop.metrics.util.MetricsDynamicMBeanBase
org.apache.hadoop.ipc.metrics.RpcDetailedActivityMBean
- All Implemented Interfaces:
- DynamicMBean
public class RpcDetailedActivityMBean
- extends MetricsDynamicMBeanBase
This is the JMX MBean for reporting the RPC layer Activity. The MBean is
register using the name
"hadoop:service=,name=RpcDetailedActivityForPort"
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RpcDetailedActivityMBean
public RpcDetailedActivityMBean(MetricsRegistry mr,
String serviceName,
String port)
- Parameters:
mr
- - the metrics registry that has all the metricsserviceName
- - the service name for the rpc serviceport
- - the rpc port.
shutdown
public void shutdown()
Copyright © 2009 The Apache Software Foundation