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.MetricsTimeVaryingRate atomicIncrementTime
           
 org.apache.hadoop.metrics.util.MetricsLongValue blockCacheCount
          Block cache item count.
 org.apache.hadoop.metrics.util.MetricsLongValue blockCacheFree
          Block cache free size.
 org.apache.hadoop.metrics.util.MetricsIntValue blockCacheHitRatio
          Block hit ratio.
 org.apache.hadoop.metrics.util.MetricsLongValue blockCacheSize
          Block cache size.
 org.apache.hadoop.metrics.util.MetricsIntValue compactionQueueSize
          Size of the compaction queue.
 org.apache.hadoop.metrics.util.MetricsTimeVaryingRate fsReadLatency
          filesystem read latency
 org.apache.hadoop.metrics.util.MetricsTimeVaryingRate fsSyncLatency
          filesystem sync latency
 org.apache.hadoop.metrics.util.MetricsTimeVaryingRate fsWriteLatency
          filesystem write latency
 org.apache.hadoop.metrics.util.MetricsIntValue memstoreSizeMB
          Sum of all the memstore 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

atomicIncrementTime

public final org.apache.hadoop.metrics.util.MetricsTimeVaryingRate atomicIncrementTime

regions

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


blockCacheSize

public final org.apache.hadoop.metrics.util.MetricsLongValue blockCacheSize
Block cache size.


blockCacheFree

public final org.apache.hadoop.metrics.util.MetricsLongValue blockCacheFree
Block cache free size.


blockCacheCount

public final org.apache.hadoop.metrics.util.MetricsLongValue blockCacheCount
Block cache item count.


blockCacheHitRatio

public final org.apache.hadoop.metrics.util.MetricsIntValue blockCacheHitRatio
Block hit ratio.


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


memstoreSizeMB

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


compactionQueueSize

public final org.apache.hadoop.metrics.util.MetricsIntValue compactionQueueSize
Size of the compaction queue.


fsReadLatency

public final org.apache.hadoop.metrics.util.MetricsTimeVaryingRate fsReadLatency
filesystem read latency


fsWriteLatency

public final org.apache.hadoop.metrics.util.MetricsTimeVaryingRate fsWriteLatency
filesystem write latency


fsSyncLatency

public final org.apache.hadoop.metrics.util.MetricsTimeVaryingRate fsSyncLatency
filesystem sync latency

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
Parameters:
unused - unused argument

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 © 2010 Apache Software Foundation. All Rights Reserved.