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 blockCacheEvictedCount
          Block cache evict count.
 org.apache.hadoop.metrics.util.MetricsLongValue blockCacheFree
          Block cache free size.
 org.apache.hadoop.metrics.util.MetricsIntValue blockCacheHitCachingRatio
          Block hit caching ratio.
 org.apache.hadoop.metrics.util.MetricsLongValue blockCacheHitCount
          Block cache hit count.
 org.apache.hadoop.metrics.util.MetricsIntValue blockCacheHitRatio
          Block hit ratio.
 org.apache.hadoop.metrics.util.MetricsLongValue blockCacheMissCount
          Block cache miss count.
 org.apache.hadoop.metrics.util.MetricsLongValue blockCacheSize
          Block cache size.
 org.apache.hadoop.metrics.util.MetricsIntValue compactionQueueSize
          Size of the compaction queue.
protected  PersistentMetricsTimeVaryingRate compactionSize
           
protected  PersistentMetricsTimeVaryingRate compactionTime
          time each scheduled compaction takes
 org.apache.hadoop.metrics.util.MetricsIntValue flushQueueSize
          Size of the flush queue.
protected  PersistentMetricsTimeVaryingRate flushSize
           
protected  PersistentMetricsTimeVaryingRate flushTime
          time each scheduled flush takes
 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 requests
          Count of requests to the regionservers since last call to metrics update
 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 addCompaction(Pair<Long,Long> compact)
           
 void addFlush(List<Pair<Long,Long>> flushes)
           
 void doUpdates(org.apache.hadoop.metrics.MetricsContext caller)
          Since this object is a registered updater, this method will be called periodically, e.g.
 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.


blockCacheHitCount

public final org.apache.hadoop.metrics.util.MetricsLongValue blockCacheHitCount
Block cache hit count.


blockCacheMissCount

public final org.apache.hadoop.metrics.util.MetricsLongValue blockCacheMissCount
Block cache miss count.


blockCacheEvictedCount

public final org.apache.hadoop.metrics.util.MetricsLongValue blockCacheEvictedCount
Block cache evict count.


blockCacheHitRatio

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


blockCacheHitCachingRatio

public final org.apache.hadoop.metrics.util.MetricsIntValue blockCacheHitCachingRatio
Block hit caching ratio. This only includes the requests to the block cache where caching was turned on. See HBASE-2253.


requests

public final org.apache.hadoop.metrics.util.MetricsIntValue requests
Count of requests to the regionservers since last call to metrics update


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.


flushQueueSize

public final org.apache.hadoop.metrics.util.MetricsIntValue flushQueueSize
Size of the flush 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


compactionTime

protected final PersistentMetricsTimeVaryingRate compactionTime
time each scheduled compaction takes


compactionSize

protected final PersistentMetricsTimeVaryingRate compactionSize

flushTime

protected final PersistentMetricsTimeVaryingRate flushTime
time each scheduled flush takes


flushSize

protected final PersistentMetricsTimeVaryingRate flushSize
Constructor Detail

RegionServerMetrics

public RegionServerMetrics()
Method Detail

shutdown

public void shutdown()

doUpdates

public void doUpdates(org.apache.hadoop.metrics.MetricsContext caller)
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:
caller - the metrics context that this responsible for calling us

resetAllMinMax

public void resetAllMinMax()

addCompaction

public void addCompaction(Pair<Long,Long> compact)
Parameters:
compact - history in

addFlush

public void addFlush(List<Pair<Long,Long>> flushes)
Parameters:
flushes - history in

toString

public String toString()
Overrides:
toString in class Object


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