org.apache.hadoop.hbase.regionserver
Class RegionServerAccounting

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.RegionServerAccounting

public class RegionServerAccounting
extends Object

RegionServerAccounting keeps record of some basic real time information about the Region Server. Currently, it only keeps record the global memstore size.


Constructor Summary
RegionServerAccounting()
           
 
Method Summary
 long addAndGetGlobalMemstoreSize(long memStoreSize)
           
 long addAndGetRegionReplayEditsSize(byte[] regionName, long memStoreSize)
          Add memStoreSize to replayEditsPerRegion.
 void clearRegionReplayEditsSize(byte[] regionName)
          Clear a region from replayEditsPerRegion.
 long getGlobalMemstoreSize()
           
 long rollbackRegionReplayEditsSize(byte[] regionName)
          Roll back the global MemStore size for a specified region when this region can't be opened.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegionServerAccounting

public RegionServerAccounting()
Method Detail

getGlobalMemstoreSize

public long getGlobalMemstoreSize()
Returns:
the global Memstore size in the RegionServer

addAndGetGlobalMemstoreSize

public long addAndGetGlobalMemstoreSize(long memStoreSize)
Parameters:
memStoreSize - the Memstore size will be added to the global Memstore size
Returns:
the global Memstore size in the RegionServer

addAndGetRegionReplayEditsSize

public long addAndGetRegionReplayEditsSize(byte[] regionName,
                                           long memStoreSize)
Add memStoreSize to replayEditsPerRegion.

Parameters:
regionName - region name.
memStoreSize - the Memstore size will be added to replayEditsPerRegion.
Returns:
the replay edits size for region hri.

rollbackRegionReplayEditsSize

public long rollbackRegionReplayEditsSize(byte[] regionName)
Roll back the global MemStore size for a specified region when this region can't be opened.

Parameters:
regionName - the region which could not open.
Returns:
the global Memstore size in the RegionServer

clearRegionReplayEditsSize

public void clearRegionReplayEditsSize(byte[] regionName)
Clear a region from replayEditsPerRegion.

Parameters:
regionName - region name.


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