@InterfaceAudience.Private public class HRegionServer extends Object implements ClientProtos.ClientService.BlockingInterface, AdminProtos.AdminService.BlockingInterface, Runnable, RegionServerServices, HBaseRPCErrorHandler, LastSequenceId
Modifier and Type | Class and Description |
---|---|
protected static class |
HRegionServer.MovedRegionsCleaner
Creates a Chore thread to clean the moved region cache.
|
protected static interface |
HRegionServer.QosPriority |
Modifier and Type | Field and Description |
---|---|
protected boolean |
abortRequested |
protected org.apache.hadoop.hbase.regionserver.MemStoreFlusher |
cacheFlusher |
protected CatalogTracker |
catalogTracker |
protected static String |
CLOSE |
CompactSplitThread |
compactSplitThread |
protected org.apache.hadoop.conf.Configuration |
conf |
protected HFileSystem |
fs |
protected boolean |
fsOk |
protected HLog |
hlog |
protected HLog |
hlogForMeta |
protected boolean |
isOnline |
protected Leases |
leases |
protected ReentrantReadWriteLock |
lock |
static org.apache.commons.logging.Log |
LOG |
protected long |
maxScannerResultSize |
protected Map<String,org.apache.hadoop.hbase.regionserver.HRegionServer.MovedRegionInfo> |
movedRegions |
protected int |
numRegionsToReport |
protected Map<String,HRegion> |
onlineRegions
Map of regions currently being served by this region server.
|
protected static String |
OPEN |
protected Map<String,HRegion> |
recoveringRegions
Set of regions currently being in recovering state which means it can accept writes(edits from
previous failed region server) but not reads.
|
static String |
REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS
RPC scheduler to use for the region server.
|
protected Map<String,InetSocketAddress[]> |
regionFavoredNodesMap
Map of encoded region names to the DataNode locations they should be hosted on
We store the value as InetSocketAddress since this is used only in HDFS
API (create() that takes favored nodes as hints for placing file blocks).
|
static String |
REGIONSERVER
region server process name
|
static String |
REGIONSERVER_CONF
region server configuration name
|
protected ConcurrentMap<byte[],Boolean> |
regionsInTransitionInRS |
protected ReplicationSinkService |
replicationSinkHandler |
protected ReplicationSourceService |
replicationSourceHandler |
protected ExecutorService |
service |
protected boolean |
stopped |
protected TableDescriptors |
tableDescriptors
Go here to get table descriptors.
|
protected int |
threadWakeFrequency |
Constructor and Description |
---|
HRegionServer(org.apache.hadoop.conf.Configuration conf)
Starts a HRegionServer at the default location
|
Modifier and Type | Method and Description |
---|---|
void |
abort(String reason) |
void |
abort(String reason,
Throwable cause)
Cause the server to exit without closing the regions it is serving, the log
it is using and without notifying the master.
|
protected long |
addScanner(RegionScanner s,
HRegion r) |
protected void |
addToMovedRegions(String encodedName,
ServerName destination,
long closeSeqNum) |
void |
addToOnlineRegions(HRegion region)
Add to online regions.
|
protected Result |
append(HRegion region,
ClientProtos.MutationProto m,
CellScanner cellScanner,
long nonceGroup)
Execute an append mutation.
|
ClientProtos.BulkLoadHFileResponse |
bulkLoadHFile(com.google.protobuf.RpcController controller,
ClientProtos.BulkLoadHFileRequest request)
Atomically bulk load several HFiles into an open region
|
boolean |
checkFileSystem()
Checks to see if the file system is still accessible.
|
boolean |
checkOOME(Throwable e)
Take actions on the event of an OutOfMemoryError.
|
protected void |
checkOpen()
Called to verify that this server is up and running.
|
protected void |
cleanMovedRegions()
Remove the expired entries from the moved regions list.
|
protected Throwable |
cleanup(Throwable t) |
protected Throwable |
cleanup(Throwable t,
String msg) |
protected void |
closeAllRegions(boolean abort)
Closes all regions.
|
AdminProtos.CloseRegionResponse |
closeRegion(com.google.protobuf.RpcController controller,
AdminProtos.CloseRegionRequest request)
Close a region on the region server.
|
protected boolean |
closeRegion(String encodedName,
boolean abort,
boolean zk,
int versionOfClosingNode,
ServerName sn)
Close asynchronously a region, can be called from the master or internally by the regionserver
when stopping.
|
AdminProtos.CompactRegionResponse |
compactRegion(com.google.protobuf.RpcController controller,
AdminProtos.CompactRegionRequest request)
Compact a region on the region server.
|
static HRegionServer |
constructRegionServer(Class<? extends HRegionServer> regionServerClass,
org.apache.hadoop.conf.Configuration conf2)
Utility for constructing an instance of the passed HRegionServer class.
|
protected IOException |
convertThrowableToIOE(Throwable t,
String msg) |
ClusterStatusProtos.RegionLoad |
createRegionLoad(String encodedRegionName) |
protected void |
doBatchOp(ClientProtos.RegionActionResult.Builder builder,
HRegion region,
List<ClientProtos.Action> mutations,
CellScanner cells)
Execute a list of Put/Delete mutations.
|
protected OperationStatus[] |
doReplayBatchOp(HRegion region,
List<HLogSplitter.MutationReplay> mutations)
Execute a list of Put/Delete mutations.
|
ClientProtos.CoprocessorServiceResponse |
execService(com.google.protobuf.RpcController controller,
ClientProtos.CoprocessorServiceRequest request) |
AdminProtos.FlushRegionResponse |
flushRegion(com.google.protobuf.RpcController controller,
AdminProtos.FlushRegionRequest request)
Flush a region on the region server.
|
ClientProtos.GetResponse |
get(com.google.protobuf.RpcController controller,
ClientProtos.GetRequest request)
Get data from a table.
|
CacheConfig |
getCacheConfig() |
CatalogTracker |
getCatalogTracker() |
CompactionRequestor |
getCompactionRequester() |
CompactSplitThread |
getCompactSplitThread() |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the configuration object for this server.
|
RegionServerCoprocessorHost |
getCoprocessorHost() |
String[] |
getCoprocessors() |
ExecutorService |
getExecutorService() |
InetSocketAddress[] |
getFavoredNodesForRegion(String encodedRegionName)
Return the favored nodes for a region given its encoded name.
|
org.apache.hadoop.fs.FileSystem |
getFileSystem() |
FlushRequester |
getFlushRequester() |
HRegion |
getFromOnlineRegions(String encodedRegionName)
Return
HRegion instance. |
InfoServer |
getInfoServer() |
long |
getLastSequenceId(byte[] region) |
Leases |
getLeases() |
protected org.apache.hadoop.hbase.regionserver.LogRoller |
getLogRoller() |
MasterAddressTracker |
getMasterAddressTracker() |
protected List<WALActionsListener> |
getMetaWALActionListeners() |
MetricsRegionServer |
getMetrics() |
protected HRegionInfo[] |
getMostLoadedRegions()
Get the top N most loaded regions this server is serving so we can tell the
master which regions it can reallocate if we're overloaded.
|
ServerNonceManager |
getNonceManager()
Only required for "old" log replay; if it's removed, remove this.
|
int |
getNumberOfOnlineRegions() |
HRegion |
getOnlineRegion(byte[] regionName) |
AdminProtos.GetOnlineRegionResponse |
getOnlineRegion(com.google.protobuf.RpcController controller,
AdminProtos.GetOnlineRegionRequest request) |
List<HRegion> |
getOnlineRegions(TableName tableName)
Gets the online regions of the specified table.
|
Collection<HRegion> |
getOnlineRegionsLocalContext()
For tests, web ui and metrics.
|
int |
getPriority(RPCProtos.RequestHeader header,
com.google.protobuf.Message param) |
Map<String,HRegion> |
getRecoveringRegions() |
protected HRegion |
getRegion(byte[] regionName)
Protected utility method for safely obtaining an HRegion handle.
|
protected HRegion |
getRegion(HBaseProtos.RegionSpecifier regionSpecifier)
Find the HRegion based on a region specifier
|
InetSocketAddress[] |
getRegionBlockLocations(String encodedRegionName) |
protected HRegion |
getRegionByEncodedName(byte[] regionName,
String encodedRegionName) |
protected HRegion |
getRegionByEncodedName(String encodedRegionName) |
AdminProtos.GetRegionInfoResponse |
getRegionInfo(com.google.protobuf.RpcController controller,
AdminProtos.GetRegionInfoRequest request) |
RegionServerAccounting |
getRegionServerAccounting() |
ConcurrentMap<byte[],Boolean> |
getRegionsInTransitionInRS()
Get the regions that are currently being opened or closed in the RS
|
protected org.apache.hadoop.fs.Path |
getRootDir() |
RpcServerInterface |
getRpcServer()
Returns a reference to the region server's RPC server
|
AdminProtos.GetServerInfoResponse |
getServerInfo(com.google.protobuf.RpcController controller,
AdminProtos.GetServerInfoRequest request)
Get some information of the region server.
|
ServerName |
getServerName() |
long |
getStartcode() |
AdminProtos.GetStoreFileResponse |
getStoreFile(com.google.protobuf.RpcController controller,
AdminProtos.GetStoreFileRequest request) |
TableLockManager |
getTableLockManager() |
int |
getThreadWakeFrequency()
Interval at which threads should run
|
HLog |
getWAL() |
HLog |
getWAL(HRegionInfo regionInfo) |
protected List<WALActionsListener> |
getWALActionListeners()
Called by
instantiateHLog(Path, String) setting up WAL instance. |
ZooKeeperWatcher |
getZooKeeper()
Gets the ZooKeeper instance for this server.
|
ZooKeeperWatcher |
getZooKeeperWatcher() |
protected void |
handleReportForDutyResponse(RegionServerStatusProtos.RegionServerStartupResponse c) |
protected Result |
increment(HRegion region,
ClientProtos.MutationProto mutation,
CellScanner cells,
long nonceGroup)
Execute an increment mutation.
|
protected HLog |
instantiateHLog(org.apache.hadoop.fs.Path rootdir,
String logName)
Called by
setupWALAndReplication() creating WAL instance. |
boolean |
isAborted()
Check if the server or client was aborted.
|
boolean |
isOnline()
Report the status of the server.
|
boolean |
isStopped() |
boolean |
isStopping() |
protected void |
join()
Wait on all threads to finish.
|
protected void |
kill() |
static void |
main(String[] args) |
AdminProtos.MergeRegionsResponse |
mergeRegions(com.google.protobuf.RpcController controller,
AdminProtos.MergeRegionsRequest request)
Merge regions on the region server.
|
ClientProtos.MultiResponse |
multi(com.google.protobuf.RpcController rpcc,
ClientProtos.MultiRequest request)
Execute multiple actions on a table: get, mutate, and/or execCoprocessor
|
ClientProtos.MutateResponse |
mutate(com.google.protobuf.RpcController rpcc,
ClientProtos.MutateRequest request)
Mutate data in a table.
|
protected void |
mutateRows(HRegion region,
List<ClientProtos.Action> actions,
CellScanner cellScanner)
Mutate a list of rows atomically.
|
AdminProtos.OpenRegionResponse |
openRegion(com.google.protobuf.RpcController controller,
AdminProtos.OpenRegionRequest request)
Open asynchronously a region or a set of regions on the region server.
|
void |
postOpenDeployTasks(HRegion r,
CatalogTracker ct)
Tasks to perform after region open to complete deploy of region on
regionserver
|
boolean |
removeFromOnlineRegions(HRegion r,
ServerName destination)
This method removes HRegion corresponding to hri from the Map of onlineRegions.
|
AdminProtos.ReplicateWALEntryResponse |
replay(com.google.protobuf.RpcController controller,
AdminProtos.ReplicateWALEntryRequest request)
Replay the given changes when distributedLogReplay WAL edits from a failed RS.
|
AdminProtos.ReplicateWALEntryResponse |
replicateWALEntry(com.google.protobuf.RpcController controller,
AdminProtos.ReplicateWALEntryRequest request)
Replicate WAL entries on the region server.
|
boolean |
reportRegionTransition(RegionServerStatusProtos.RegionTransition.TransitionCode code,
HRegionInfo... hris)
Notify master that a handler requests to change a region state
|
boolean |
reportRegionTransition(RegionServerStatusProtos.RegionTransition.TransitionCode code,
long openSeqNum,
HRegionInfo... hris)
Notify master that a handler requests to change a region state
|
AdminProtos.RollWALWriterResponse |
rollWALWriter(com.google.protobuf.RpcController controller,
AdminProtos.RollWALWriterRequest request)
Roll the WAL writer of the region server.
|
void |
run()
The HRegionServer sticks in this loop until closed.
|
ClientProtos.ScanResponse |
scan(com.google.protobuf.RpcController controller,
ClientProtos.ScanRequest request)
Scan data in a table.
|
AdminProtos.SplitRegionResponse |
splitRegion(com.google.protobuf.RpcController controller,
AdminProtos.SplitRegionRequest request)
Split a region on the region server.
|
static Thread |
startRegionServer(HRegionServer hrs) |
static Thread |
startRegionServer(HRegionServer hrs,
String name) |
void |
stop(String msg)
Stop this service.
|
AdminProtos.StopServerResponse |
stopServer(com.google.protobuf.RpcController controller,
AdminProtos.StopServerRequest request)
Stop the region server.
|
String |
toString() |
protected void |
tryRegionServerReport(long reportStartTime,
long reportEndTime) |
AdminProtos.UpdateFavoredNodesResponse |
updateFavoredNodes(com.google.protobuf.RpcController controller,
AdminProtos.UpdateFavoredNodesRequest request) |
void |
updateRegionFavoredNodesMapping(String encodedRegionName,
List<HBaseProtos.ServerName> favoredNodes)
Used to update the favored nodes mapping when required.
|
void |
waitForServerOnline() |
public static final org.apache.commons.logging.Log LOG
protected static final String OPEN
protected static final String CLOSE
protected final ConcurrentMap<byte[],Boolean> regionsInTransitionInRS
public static final String REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS
protected long maxScannerResultSize
protected org.apache.hadoop.hbase.regionserver.MemStoreFlusher cacheFlusher
protected CatalogTracker catalogTracker
protected TableDescriptors tableDescriptors
protected ReplicationSourceService replicationSourceHandler
protected ReplicationSinkService replicationSinkHandler
public CompactSplitThread compactSplitThread
protected final Map<String,HRegion> onlineRegions
protected final Map<String,InetSocketAddress[]> regionFavoredNodesMap
protected final Map<String,HRegion> recoveringRegions
protected Leases leases
protected ExecutorService service
protected volatile boolean fsOk
protected HFileSystem fs
protected volatile boolean stopped
protected volatile boolean abortRequested
protected final org.apache.hadoop.conf.Configuration conf
protected final ReentrantReadWriteLock lock
protected final int threadWakeFrequency
protected final int numRegionsToReport
public static final String REGIONSERVER
public static final String REGIONSERVER_CONF
protected volatile HLog hlog
protected volatile HLog hlogForMeta
protected volatile boolean isOnline
public HRegionServer(org.apache.hadoop.conf.Configuration conf) throws IOException, InterruptedException
conf
- IOException
InterruptedException
public int getPriority(RPCProtos.RequestHeader header, com.google.protobuf.Message param)
getPriority
in interface PriorityFunction
public void run()
protected void tryRegionServerReport(long reportStartTime, long reportEndTime) throws IOException
IOException
protected void handleReportForDutyResponse(RegionServerStatusProtos.RegionServerStartupResponse c) throws IOException
IOException
public RegionServerAccounting getRegionServerAccounting()
getRegionServerAccounting
in interface RegionServerServices
public TableLockManager getTableLockManager()
getTableLockManager
in interface RegionServerServices
TableLockManager
public ClusterStatusProtos.RegionLoad createRegionLoad(String encodedRegionName)
encodedRegionName
- public boolean isOnline()
protected HLog instantiateHLog(org.apache.hadoop.fs.Path rootdir, String logName) throws IOException
setupWALAndReplication()
creating WAL instance.rootdir
- logName
- IOException
protected List<WALActionsListener> getWALActionListeners()
instantiateHLog(Path, String)
setting up WAL instance.
Add any WALActionsListener
s you want inserted before WAL startup.FSHLog
on construction.protected List<WALActionsListener> getMetaWALActionListeners()
protected org.apache.hadoop.hbase.regionserver.LogRoller getLogRoller()
public MetricsRegionServer getMetrics()
public MasterAddressTracker getMasterAddressTracker()
public HLog getWAL()
public HLog getWAL(HRegionInfo regionInfo) throws IOException
getWAL
in interface RegionServerServices
IOException
public CatalogTracker getCatalogTracker()
getCatalogTracker
in interface RegionServerServices
public void stop(String msg)
Stoppable
msg
- Why we're stopping.public void waitForServerOnline()
public void postOpenDeployTasks(HRegion r, CatalogTracker ct) throws org.apache.zookeeper.KeeperException, IOException
RegionServerServices
postOpenDeployTasks
in interface RegionServerServices
r
- Region to open.ct
- Instance of CatalogTracker
org.apache.zookeeper.KeeperException
IOException
public RpcServerInterface getRpcServer()
RegionServerServices
getRpcServer
in interface RegionServerServices
public void abort(String reason, Throwable cause)
reason
- the reason we are abortingcause
- the exception that caused the abort, or nullpublic void abort(String reason)
abort(String, Throwable)
public boolean isAborted()
Abortable
protected void kill()
protected void join()
public boolean reportRegionTransition(RegionServerStatusProtos.RegionTransition.TransitionCode code, HRegionInfo... hris)
RegionServerServices
reportRegionTransition
in interface RegionServerServices
public boolean reportRegionTransition(RegionServerStatusProtos.RegionTransition.TransitionCode code, long openSeqNum, HRegionInfo... hris)
RegionServerServices
reportRegionTransition
in interface RegionServerServices
public long getLastSequenceId(byte[] region)
getLastSequenceId
in interface LastSequenceId
region
- Encoded region nameprotected void closeAllRegions(boolean abort)
public InfoServer getInfoServer()
public boolean isStopped()
public boolean isStopping()
isStopping
in interface RegionServerServices
public Map<String,HRegion> getRecoveringRegions()
getRecoveringRegions
in interface RegionServerServices
public org.apache.hadoop.conf.Configuration getConfiguration()
Server
public int getNumberOfOnlineRegions()
public Collection<HRegion> getOnlineRegionsLocalContext()
public void addToOnlineRegions(HRegion region)
public long getStartcode()
public FlushRequester getFlushRequester()
getFlushRequester
in interface RegionServerServices
protected HRegionInfo[] getMostLoadedRegions()
public Leases getLeases()
getLeases
in interface RegionServerServices
protected org.apache.hadoop.fs.Path getRootDir()
public org.apache.hadoop.fs.FileSystem getFileSystem()
getFileSystem
in interface RegionServerServices
public int getThreadWakeFrequency()
public ZooKeeperWatcher getZooKeeper()
Server
public ServerName getServerName()
public CompactionRequestor getCompactionRequester()
getCompactionRequester
in interface RegionServerServices
CompactionRequestor
or null.public ZooKeeperWatcher getZooKeeperWatcher()
public RegionServerCoprocessorHost getCoprocessorHost()
public ConcurrentMap<byte[],Boolean> getRegionsInTransitionInRS()
RegionServerServices
getRegionsInTransitionInRS
in interface RegionServerServices
public ExecutorService getExecutorService()
getExecutorService
in interface RegionServerServices
public static Thread startRegionServer(HRegionServer hrs) throws IOException
hrs
- IOException
public static Thread startRegionServer(HRegionServer hrs, String name) throws IOException
hrs
- name
- IOException
public static HRegionServer constructRegionServer(Class<? extends HRegionServer> regionServerClass, org.apache.hadoop.conf.Configuration conf2)
regionServerClass
- conf2
- public static void main(String[] args) throws Exception
Exception
HRegionServerCommandLine
public List<HRegion> getOnlineRegions(TableName tableName)
hbase:meta
.
Only returns online regions. If a region on this table has been
closed during a disable, etc., it will not be included in the returned list.
So, the returned list may not necessarily be ALL regions in this table, its
all the ONLINE regions in the table.tableName
- tableName
public String[] getCoprocessors()
protected void checkOpen() throws IOException
IOException
protected boolean closeRegion(String encodedName, boolean abort, boolean zk, int versionOfClosingNode, ServerName sn) throws NotServingRegionException, RegionAlreadyInTransitionException
If an opening was in progress, this method will cancel it, but will not start a new close. The coprocessors are not called in this case. A NotServingRegionException exception is thrown.
If a close was in progress, this new request will be ignored, and an exception thrown.
encodedName
- Region to closeabort
- True if we are abortingzk
- True if we are to update zk about the region close; if the close
was orchestrated by master, then update zk. If the close is being run by
the regionserver because its going down, don't update zk.versionOfClosingNode
- the version of znode to compare when RS transitions the znode from
CLOSING state.NotServingRegionException
- if the region is not onlineRegionAlreadyInTransitionException
- if the region is already closingpublic HRegion getOnlineRegion(byte[] regionName)
regionName
- regionName
or null if
named region is not member of the online regions.public InetSocketAddress[] getRegionBlockLocations(String encodedRegionName)
public HRegion getFromOnlineRegions(String encodedRegionName)
HRegion
instance.
Only works if caller is in same context, in same JVM. HRegion is not
serializable.encodedRegionName
or
null if named region is not member of the online regions.public boolean removeFromOnlineRegions(HRegion r, ServerName destination)
r
- Region to remove.destination
- Destination, if any, null otherwise.protected HRegion getRegion(byte[] regionName) throws NotServingRegionException
regionName
- Name of online HRegion
to returnHRegion
for regionName
NotServingRegionException
protected HRegion getRegionByEncodedName(String encodedRegionName) throws NotServingRegionException
NotServingRegionException
protected HRegion getRegionByEncodedName(byte[] regionName, String encodedRegionName) throws NotServingRegionException
NotServingRegionException
protected IOException convertThrowableToIOE(Throwable t, String msg)
public boolean checkOOME(Throwable e)
HBaseRPCErrorHandler
checkOOME
in interface HBaseRPCErrorHandler
e
- the throwablepublic boolean checkFileSystem()
protected long addScanner(RegionScanner s, HRegion r) throws Leases.LeaseStillHeldException
Leases.LeaseStillHeldException
public ClientProtos.GetResponse get(com.google.protobuf.RpcController controller, ClientProtos.GetRequest request) throws com.google.protobuf.ServiceException
get
in interface ClientProtos.ClientService.BlockingInterface
controller
- the RPC controllerrequest
- the get requestcom.google.protobuf.ServiceException
public ClientProtos.MutateResponse mutate(com.google.protobuf.RpcController rpcc, ClientProtos.MutateRequest request) throws com.google.protobuf.ServiceException
mutate
in interface ClientProtos.ClientService.BlockingInterface
rpcc
- the RPC controllerrequest
- the mutate requestcom.google.protobuf.ServiceException
public ClientProtos.ScanResponse scan(com.google.protobuf.RpcController controller, ClientProtos.ScanRequest request) throws com.google.protobuf.ServiceException
scan
in interface ClientProtos.ClientService.BlockingInterface
controller
- the RPC controllerrequest
- the scan requestcom.google.protobuf.ServiceException
public ClientProtos.BulkLoadHFileResponse bulkLoadHFile(com.google.protobuf.RpcController controller, ClientProtos.BulkLoadHFileRequest request) throws com.google.protobuf.ServiceException
bulkLoadHFile
in interface ClientProtos.ClientService.BlockingInterface
IOException
- if failed unrecoverablycom.google.protobuf.ServiceException
public ClientProtos.CoprocessorServiceResponse execService(com.google.protobuf.RpcController controller, ClientProtos.CoprocessorServiceRequest request) throws com.google.protobuf.ServiceException
execService
in interface ClientProtos.ClientService.BlockingInterface
com.google.protobuf.ServiceException
public ClientProtos.MultiResponse multi(com.google.protobuf.RpcController rpcc, ClientProtos.MultiRequest request) throws com.google.protobuf.ServiceException
multi
in interface ClientProtos.ClientService.BlockingInterface
rpcc
- the RPC controllerrequest
- the multi requestcom.google.protobuf.ServiceException
public AdminProtos.GetRegionInfoResponse getRegionInfo(com.google.protobuf.RpcController controller, AdminProtos.GetRegionInfoRequest request) throws com.google.protobuf.ServiceException
getRegionInfo
in interface AdminProtos.AdminService.BlockingInterface
com.google.protobuf.ServiceException
public AdminProtos.GetStoreFileResponse getStoreFile(com.google.protobuf.RpcController controller, AdminProtos.GetStoreFileRequest request) throws com.google.protobuf.ServiceException
getStoreFile
in interface AdminProtos.AdminService.BlockingInterface
com.google.protobuf.ServiceException
public AdminProtos.GetOnlineRegionResponse getOnlineRegion(com.google.protobuf.RpcController controller, AdminProtos.GetOnlineRegionRequest request) throws com.google.protobuf.ServiceException
getOnlineRegion
in interface AdminProtos.AdminService.BlockingInterface
com.google.protobuf.ServiceException
public AdminProtos.OpenRegionResponse openRegion(com.google.protobuf.RpcController controller, AdminProtos.OpenRegionRequest request) throws com.google.protobuf.ServiceException
Different manages states for the region are:
Bulk assign: If there are more than 1 region to open, it will be considered as a bulk assign. For a single region opening, errors are sent through a ServiceException. For bulk assign, errors are put in the response as FAILED_OPENING.
openRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
public void updateRegionFavoredNodesMapping(String encodedRegionName, List<HBaseProtos.ServerName> favoredNodes)
public InetSocketAddress[] getFavoredNodesForRegion(String encodedRegionName)
regionFavoredNodesMap
on why it is InetSocketAddress[]encodedRegionName
- public AdminProtos.CloseRegionResponse closeRegion(com.google.protobuf.RpcController controller, AdminProtos.CloseRegionRequest request) throws com.google.protobuf.ServiceException
closeRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
public AdminProtos.FlushRegionResponse flushRegion(com.google.protobuf.RpcController controller, AdminProtos.FlushRegionRequest request) throws com.google.protobuf.ServiceException
flushRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
public AdminProtos.SplitRegionResponse splitRegion(com.google.protobuf.RpcController controller, AdminProtos.SplitRegionRequest request) throws com.google.protobuf.ServiceException
splitRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
public AdminProtos.MergeRegionsResponse mergeRegions(com.google.protobuf.RpcController controller, AdminProtos.MergeRegionsRequest request) throws com.google.protobuf.ServiceException
mergeRegions
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
public AdminProtos.CompactRegionResponse compactRegion(com.google.protobuf.RpcController controller, AdminProtos.CompactRegionRequest request) throws com.google.protobuf.ServiceException
compactRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
public AdminProtos.ReplicateWALEntryResponse replicateWALEntry(com.google.protobuf.RpcController controller, AdminProtos.ReplicateWALEntryRequest request) throws com.google.protobuf.ServiceException
replicateWALEntry
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
public AdminProtos.ReplicateWALEntryResponse replay(com.google.protobuf.RpcController controller, AdminProtos.ReplicateWALEntryRequest request) throws com.google.protobuf.ServiceException
replay
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
public AdminProtos.RollWALWriterResponse rollWALWriter(com.google.protobuf.RpcController controller, AdminProtos.RollWALWriterRequest request) throws com.google.protobuf.ServiceException
rollWALWriter
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
public AdminProtos.StopServerResponse stopServer(com.google.protobuf.RpcController controller, AdminProtos.StopServerRequest request) throws com.google.protobuf.ServiceException
stopServer
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
public AdminProtos.GetServerInfoResponse getServerInfo(com.google.protobuf.RpcController controller, AdminProtos.GetServerInfoRequest request) throws com.google.protobuf.ServiceException
getServerInfo
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestcom.google.protobuf.ServiceException
protected HRegion getRegion(HBaseProtos.RegionSpecifier regionSpecifier) throws IOException
regionSpecifier
- the region specifierIOException
- if the specifier is not null,
but failed to find the regionprotected Result append(HRegion region, ClientProtos.MutationProto m, CellScanner cellScanner, long nonceGroup) throws IOException
region
- m
- cellScanner
- IOException
protected Result increment(HRegion region, ClientProtos.MutationProto mutation, CellScanner cells, long nonceGroup) throws IOException
region
- mutation
- IOException
public ServerNonceManager getNonceManager()
RegionServerServices
getNonceManager
in interface RegionServerServices
protected void doBatchOp(ClientProtos.RegionActionResult.Builder builder, HRegion region, List<ClientProtos.Action> mutations, CellScanner cells)
builder
- region
- mutations
- protected OperationStatus[] doReplayBatchOp(HRegion region, List<HLogSplitter.MutationReplay> mutations) throws IOException
region
- mutations
- IOException
protected void mutateRows(HRegion region, List<ClientProtos.Action> actions, CellScanner cellScanner) throws IOException
region
- actions
- cellScanner
- if non-null, the mutation data -- the Cell content.IOException
protected void addToMovedRegions(String encodedName, ServerName destination, long closeSeqNum)
protected void cleanMovedRegions()
public CompactSplitThread getCompactSplitThread()
CompactSplitThread
for the serverspublic AdminProtos.UpdateFavoredNodesResponse updateFavoredNodes(com.google.protobuf.RpcController controller, AdminProtos.UpdateFavoredNodesRequest request) throws com.google.protobuf.ServiceException
updateFavoredNodes
in interface AdminProtos.AdminService.BlockingInterface
com.google.protobuf.ServiceException
public CacheConfig getCacheConfig()
Copyright © 2014 The Apache Software Foundation. All rights reserved.