org.apache.hadoop.hbase.regionserver
Interface RegionServerServices

All Known Implementing Classes:
HRegionServer

public interface RegionServerServices

Services provided by HRegionServer


Method Summary
 void addToOnlineRegions(HRegion r)
          Add to online regions.
 boolean containsKeyInRegionsInTransition(HRegionInfo hri)
           
 CompactionRequestor getCompactionRequester()
           
 org.apache.hadoop.fs.FileSystem getFileSystem()
           
 FlushRequester getFlushRequester()
           
 HRegion getFromOnlineRegions(String encodedRegionName)
          Return HRegion instance.
 Leases getLeases()
           
 List<HRegion> getOnlineRegions(byte[] tableName)
          Get all online regions of a table in this RS.
 RegionServerAccounting getRegionServerAccounting()
           
 RpcServer getRpcServer()
          Returns a reference to the region server's RPC server
 HLog getWAL()
           
 boolean isStopping()
           
 void postOpenDeployTasks(HRegion r, CatalogTracker ct, boolean daughter)
          Tasks to perform after region open to complete deploy of region on regionserver
 boolean removeFromOnlineRegions(String encodedRegionName)
          This method removes HRegion corresponding to hri from the Map of onlineRegions.
 boolean removeFromRegionsInTransition(HRegionInfo hri)
          Remove passed hri from the internal list of regions in transition on this regionserver.
 
Methods inherited from interface org.apache.hadoop.hbase.Server
getCatalogTracker, getConfiguration, getServerName, getZooKeeper
 
Methods inherited from interface org.apache.hadoop.hbase.Abortable
abort, isAborted
 
Methods inherited from interface org.apache.hadoop.hbase.Stoppable
isStopped, stop
 

Method Detail

isStopping

boolean isStopping()
Returns:
True if this regionserver is stopping.

getWAL

HLog getWAL()
Returns:
the HLog

getCompactionRequester

CompactionRequestor getCompactionRequester()
Returns:
Implementation of CompactionRequestor or null.

getFlushRequester

FlushRequester getFlushRequester()
Returns:
Implementation of FlushRequester or null.

getRegionServerAccounting

RegionServerAccounting getRegionServerAccounting()
Returns:
the RegionServerAccounting for this Region Server

postOpenDeployTasks

void postOpenDeployTasks(HRegion r,
                         CatalogTracker ct,
                         boolean daughter)
                         throws org.apache.zookeeper.KeeperException,
                                IOException
Tasks to perform after region open to complete deploy of region on regionserver

Parameters:
r - Region to open.
ct - Instance of CatalogTracker
daughter - True if this is daughter of a split
Throws:
org.apache.zookeeper.KeeperException
IOException

getRpcServer

RpcServer getRpcServer()
Returns a reference to the region server's RPC server


removeFromRegionsInTransition

boolean removeFromRegionsInTransition(HRegionInfo hri)
Remove passed hri from the internal list of regions in transition on this regionserver.

Parameters:
hri - Region to remove.
Returns:
True if removed

containsKeyInRegionsInTransition

boolean containsKeyInRegionsInTransition(HRegionInfo hri)
Parameters:
hri -
Returns:
True if the internal list of regions in transition includes the passed hri.

getFileSystem

org.apache.hadoop.fs.FileSystem getFileSystem()
Returns:
Return the FileSystem object used by the regionserver

getLeases

Leases getLeases()
Returns:
The RegionServer's "Leases" service

addToOnlineRegions

void addToOnlineRegions(HRegion r)
Add to online regions.

Parameters:
r -

removeFromOnlineRegions

boolean removeFromOnlineRegions(String encodedRegionName)
This method removes HRegion corresponding to hri from the Map of onlineRegions.

Parameters:
encodedRegionName -
Returns:
True if we removed a region from online list.

getFromOnlineRegions

HRegion getFromOnlineRegions(String encodedRegionName)
Return HRegion instance. Only works if caller is in same context, in same JVM. HRegion is not serializable.

Parameters:
encodedRegionName -
Returns:
HRegion for the passed encoded encodedRegionName or null if named region is not member of the online regions.

getOnlineRegions

List<HRegion> getOnlineRegions(byte[] tableName)
                               throws IOException
Get all online regions of a table in this RS.

Parameters:
tableName -
Returns:
List of HRegion
Throws:
IOException


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