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

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

public class RegionServerMetrics
extends Object
implements org.apache.hadoop.metrics.Updater

This class is for maintaining the various regionserver statistics and publishing them through the metrics interfaces.

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


Field Summary
 org.apache.hadoop.metrics.util.MetricsIntValue memcacheSizeMB
          Sum of all the memcache sizes in this regionserver in MB
 org.apache.hadoop.metrics.util.MetricsIntValue regions
          Count of regions carried by this regionserver
 org.apache.hadoop.metrics.util.MetricsIntValue storefileIndexSizeMB
          Sum of all the storefile index sizes in this regionserver in MB
 org.apache.hadoop.metrics.util.MetricsIntValue storefiles
          Count of storefiles open on the regionserver.
 org.apache.hadoop.metrics.util.MetricsIntValue stores
          Count of stores open on the regionserver.
 
Constructor Summary
RegionServerMetrics()
           
 
Method Summary
 void doUpdates(org.apache.hadoop.metrics.MetricsContext unused)
          Since this object is a registered updater, this method will be called periodically, e.g.
 float getRequests()
           
 void incrementRequests(int inc)
           
 void resetAllMinMax()
           
 void shutdown()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

regions

public final org.apache.hadoop.metrics.util.MetricsIntValue regions
Count of regions carried by this regionserver


stores

public final org.apache.hadoop.metrics.util.MetricsIntValue stores
Count of stores open on the regionserver.


storefiles

public final org.apache.hadoop.metrics.util.MetricsIntValue storefiles
Count of storefiles open on the regionserver.


storefileIndexSizeMB

public final org.apache.hadoop.metrics.util.MetricsIntValue storefileIndexSizeMB
Sum of all the storefile index sizes in this regionserver in MB


memcacheSizeMB

public final org.apache.hadoop.metrics.util.MetricsIntValue memcacheSizeMB
Sum of all the memcache sizes in this regionserver in MB

Constructor Detail

RegionServerMetrics

public RegionServerMetrics()
Method Detail

shutdown

public void shutdown()

doUpdates

public void doUpdates(org.apache.hadoop.metrics.MetricsContext unused)
Since this object is a registered updater, this method will be called periodically, e.g. every 5 seconds.

Specified by:
doUpdates in interface org.apache.hadoop.metrics.Updater

resetAllMinMax

public void resetAllMinMax()

getRequests

public float getRequests()
Returns:
Count of requests.

incrementRequests

public void incrementRequests(int inc)
Parameters:
inc - How much to add to requests.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 The Apache Software Foundation