org.apache.hadoop.hbase.regionserver.metrics
Class RegionServerDynamicMetrics

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.metrics.RegionServerDynamicMetrics
All Implemented Interfaces:
org.apache.hadoop.metrics.Updater

public class RegionServerDynamicMetrics
extends Object
implements org.apache.hadoop.metrics.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
 org.apache.hadoop.metrics.util.MetricsRegistry registry
          The metrics variables are public: - they can be set directly by calling their set/inc methods -they can also be read directly - e.g.
 
Method Summary
 void clear()
          Clear all metrics this exposes.
 void doUpdates(org.apache.hadoop.metrics.MetricsContext context)
          Push the metrics to the monitoring subsystem on doUpdate() call.
 void incrTimeVaryingMetric(String name, long amt, int numOps)
           
static RegionServerDynamicMetrics newInstance(HRegionServer regionServer)
           
 void setNumericMetric(String name, long amt)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registry

public final org.apache.hadoop.metrics.util.MetricsRegistry registry
The metrics variables are public: - they can be set directly by calling their set/inc methods -they can also be read directly - e.g. JMX does this.

Method Detail

newInstance

public static RegionServerDynamicMetrics newInstance(HRegionServer regionServer)

setNumericMetric

public void setNumericMetric(String name,
                             long amt)

incrTimeVaryingMetric

public void incrTimeVaryingMetric(String name,
                                  long amt,
                                  int numOps)

clear

public void clear()
Clear all metrics this exposes. Uses reflection to clear them from hadoop metrics side as well.


doUpdates

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

Specified by:
doUpdates in interface org.apache.hadoop.metrics.Updater
Parameters:
context - ctx

shutdown

public void shutdown()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.