org.apache.hadoop.ipc.metrics
Class RpcMetrics

java.lang.Object
  extended by org.apache.hadoop.ipc.metrics.RpcMetrics
All Implemented Interfaces:
Updater

public class RpcMetrics
extends Object
implements Updater

This class is for maintaining the various RPC statistics and publishing them through the metrics interfaces. This also registers the JMX MBean for RPC.

This class has a number of metrics variables that are publicly accessible; these variables (objects) have methods to update their values; for example:

rpcQueueTime.inc(time)


Field Summary
 MetricsTimeVaryingInt authenticationFailures
          metrics - number of failed authentications
 MetricsTimeVaryingInt authenticationSuccesses
          metrics - number of successful authentications
 MetricsTimeVaryingInt authorizationFailures
          metrics - number of failed authorizations
 MetricsTimeVaryingInt authorizationSuccesses
          metrics - number of successful authorizations
 MetricsIntValue callQueueLen
          metrics - length of the queue
 MetricsIntValue numOpenConnections
          metrics - number of open connections
 MetricsTimeVaryingLong receivedBytes
          metrics - number of bytes received
 MetricsTimeVaryingRate rpcProcessingTime
          metrics - rpc processing time
 MetricsTimeVaryingRate rpcQueueTime
          metrics - rpc queue time
 MetricsTimeVaryingLong sentBytes
          metrics - number of bytes sent
 
Constructor Summary
RpcMetrics(String hostName, String port, Server server)
           
 
Method Summary
 void doUpdates(MetricsContext context)
          Push the metrics to the monitoring subsystem on doUpdate() call.
 void shutdown()
          shutdown the metrics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

receivedBytes

public final MetricsTimeVaryingLong receivedBytes
metrics - number of bytes received


sentBytes

public final MetricsTimeVaryingLong sentBytes
metrics - number of bytes sent


rpcQueueTime

public final MetricsTimeVaryingRate rpcQueueTime
metrics - rpc queue time


rpcProcessingTime

public final MetricsTimeVaryingRate rpcProcessingTime
metrics - rpc processing time


numOpenConnections

public final MetricsIntValue numOpenConnections
metrics - number of open connections


callQueueLen

public final MetricsIntValue callQueueLen
metrics - length of the queue


authenticationFailures

public final MetricsTimeVaryingInt authenticationFailures
metrics - number of failed authentications


authenticationSuccesses

public final MetricsTimeVaryingInt authenticationSuccesses
metrics - number of successful authentications


authorizationFailures

public final MetricsTimeVaryingInt authorizationFailures
metrics - number of failed authorizations


authorizationSuccesses

public final MetricsTimeVaryingInt authorizationSuccesses
metrics - number of successful authorizations

Constructor Detail

RpcMetrics

public RpcMetrics(String hostName,
                  String port,
                  Server server)
Method Detail

doUpdates

public void doUpdates(MetricsContext context)
Push the metrics to the monitoring subsystem on doUpdate() call.

Specified by:
doUpdates in interface Updater

shutdown

public void shutdown()
shutdown the metrics



Copyright © 2009 The Apache Software Foundation