public class RSRpcServices extends java.lang.Object implements HBaseRPCErrorHandler, PriorityFunction, ConfigurationObserver
| Modifier and Type | Field and Description |
|---|---|
protected AccessChecker |
accessChecker |
protected static Logger |
LOG |
static java.lang.String |
REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS
RPC scheduler to use for the region server.
|
static java.lang.String |
REGIONSERVER_ADMIN_SERVICE_CONFIG
Services launched in RSRpcServices.
|
static java.lang.String |
REGIONSERVER_CLIENT_SERVICE_CONFIG |
protected static java.lang.String |
RESERVOIR_ENABLED_KEY |
| Constructor and Description |
|---|
RSRpcServices(HRegionServer rs) |
| Modifier and Type | Method and Description |
|---|---|
BulkLoadHFileResponse |
bulkLoadHFile(RpcController controller,
BulkLoadHFileRequest request)
Atomically bulk load several HFiles into an open region
|
boolean |
checkOOME(java.lang.Throwable e)
Take actions on the event of an OutOfMemoryError.
|
protected void |
checkOpen()
Called to verify that this server is up and running.
|
CleanupBulkLoadResponse |
cleanupBulkLoad(RpcController controller,
CleanupBulkLoadRequest request) |
ClearCompactionQueuesResponse |
clearCompactionQueues(RpcController controller,
ClearCompactionQueuesRequest request) |
ClearRegionBlockCacheResponse |
clearRegionBlockCache(RpcController controller,
ClearRegionBlockCacheRequest request) |
CloseRegionResponse |
closeRegion(RpcController controller,
CloseRegionRequest request)
Close a region on the region server.
|
CompactRegionResponse |
compactRegion(RpcController controller,
CompactRegionRequest request)
Compact a region on the region server.
|
protected PriorityFunction |
createPriority() |
protected RpcServerInterface |
createRpcServer(Server server,
Configuration conf,
RpcSchedulerFactory rpcSchedulerFactory,
java.net.InetSocketAddress bindAddress,
java.lang.String name) |
CoprocessorServiceResponse |
execRegionServerService(RpcController controller,
CoprocessorServiceRequest request) |
CoprocessorServiceResponse |
execService(RpcController controller,
CoprocessorServiceRequest request) |
ExecuteProceduresResponse |
executeProcedures(RpcController controller,
ExecuteProceduresRequest request) |
static boolean |
exitIfOOME(java.lang.Throwable e) |
FlushRegionResponse |
flushRegion(RpcController controller,
FlushRegionRequest request)
Flush a region on the region server.
|
GetResponse |
get(RpcController controller,
GetRequest request)
Get data from a table.
|
Configuration |
getConfiguration() |
long |
getDeadline(RequestHeader header,
Message param)
Returns the deadline of the specified request.
|
static java.lang.String |
getHostname(Configuration conf,
boolean isMaster) |
GetOnlineRegionResponse |
getOnlineRegion(RpcController controller,
GetOnlineRegionRequest request) |
PriorityFunction |
getPriority() |
int |
getPriority(RequestHeader header,
Message param,
User user)
Returns the 'priority type' of the specified request.
|
HRegion |
getRegion(RegionSpecifier regionSpecifier)
Find the HRegion based on a region specifier
|
GetRegionInfoResponse |
getRegionInfo(RpcController controller,
GetRegionInfoRequest request) |
GetRegionLoadResponse |
getRegionLoad(RpcController controller,
GetRegionLoadRequest request) |
java.lang.String |
getScanDetailsWithId(long scannerId) |
RegionScanner |
getScanner(long scannerId) |
int |
getScannersCount() |
GetServerInfoResponse |
getServerInfo(RpcController controller,
GetServerInfoRequest request)
Get some information of the region server.
|
protected java.util.List<RpcServer.BlockingServiceAndInterface> |
getServices()
By default, put up an Admin and a Client Service.
|
java.net.InetSocketAddress |
getSocketAddress() |
GetSpaceQuotaSnapshotsResponse |
getSpaceQuotaSnapshots(RpcController controller,
GetSpaceQuotaSnapshotsRequest request) |
GetStoreFileResponse |
getStoreFile(RpcController controller,
GetStoreFileRequest request) |
MultiResponse |
multi(RpcController rpcc,
MultiRequest request)
Execute multiple actions on a table: get, mutate, and/or execCoprocessor
|
MutateResponse |
mutate(RpcController rpcc,
MutateRequest request)
Mutate data in a table.
|
void |
onConfigurationChange(Configuration newConf)
This method would be called by the
ConfigurationManager
object when the Configuration object is reloaded from disk. |
OpenRegionResponse |
openRegion(RpcController controller,
OpenRegionRequest request)
Open asynchronously a region or a set of regions on the region server.
|
PrepareBulkLoadResponse |
prepareBulkLoad(RpcController controller,
PrepareBulkLoadRequest request) |
ReplicateWALEntryResponse |
replay(RpcController controller,
ReplicateWALEntryRequest request)
Replay the given changes when distributedLogReplay WAL edits from a failed RS.
|
ReplicateWALEntryResponse |
replicateWALEntry(RpcController controller,
ReplicateWALEntryRequest request)
Replicate WAL entries on the region server.
|
protected void |
requirePermission(java.lang.String request,
Permission.Action perm) |
RollWALWriterResponse |
rollWALWriter(RpcController controller,
RollWALWriterRequest request)
Roll the WAL writer of the region server.
|
ScanResponse |
scan(RpcController controller,
ScanRequest request)
Scan data in a table.
|
StopServerResponse |
stopServer(RpcController controller,
StopServerRequest request)
Stop the region server.
|
UpdateConfigurationResponse |
updateConfiguration(RpcController controller,
UpdateConfigurationRequest request) |
UpdateFavoredNodesResponse |
updateFavoredNodes(RpcController controller,
UpdateFavoredNodesRequest request) |
WarmupRegionResponse |
warmupRegion(RpcController controller,
WarmupRegionRequest request)
Wamrmup a region on this server.
|
protected static final Logger LOG
public static final java.lang.String REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS
protected static final java.lang.String RESERVOIR_ENABLED_KEY
protected AccessChecker accessChecker
public static final java.lang.String REGIONSERVER_ADMIN_SERVICE_CONFIG
public static final java.lang.String REGIONSERVER_CLIENT_SERVICE_CONFIG
public RSRpcServices(HRegionServer rs) throws java.io.IOException
java.io.IOExceptionprotected RpcServerInterface createRpcServer(Server server, Configuration conf, RpcSchedulerFactory rpcSchedulerFactory, java.net.InetSocketAddress bindAddress, java.lang.String name) throws java.io.IOException
java.io.IOExceptionpublic void onConfigurationChange(Configuration newConf)
ConfigurationObserverConfigurationManager
object when the Configuration object is reloaded from disk.onConfigurationChange in interface ConfigurationObserverprotected PriorityFunction createPriority()
protected void requirePermission(java.lang.String request,
Permission.Action perm)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getHostname(Configuration conf,
boolean isMaster)
throws java.net.UnknownHostException
java.net.UnknownHostExceptionpublic int getScannersCount()
public RegionScanner getScanner(long scannerId)
public java.lang.String getScanDetailsWithId(long scannerId)
public HRegion getRegion(RegionSpecifier regionSpecifier) throws java.io.IOException
regionSpecifier - the region specifierjava.io.IOException - if the specifier is not null,
but failed to find the regionpublic PriorityFunction getPriority()
public Configuration getConfiguration()
protected void checkOpen()
throws java.io.IOException
java.io.IOExceptionprotected java.util.List<RpcServer.BlockingServiceAndInterface> getServices()
hbase.regionserver.admin.executorService and
hbase.regionserver.client.executorService if you want to enable/disable services.
Default is that both are enabled.public java.net.InetSocketAddress getSocketAddress()
public int getPriority(RequestHeader header,
Message param,
User user)
PriorityFunctiongetPriority in interface PriorityFunctionpublic long getDeadline(RequestHeader header,
Message param)
PriorityFunctiongetDeadline in interface PriorityFunctionpublic boolean checkOOME(java.lang.Throwable e)
HBaseRPCErrorHandlercheckOOME in interface HBaseRPCErrorHandlere - the throwablepublic static boolean exitIfOOME(java.lang.Throwable e)
public CloseRegionResponse closeRegion(RpcController controller,
CloseRegionRequest request)
throws ServiceException
controller - the RPC controllerrequest - the requestServiceExceptionpublic CompactRegionResponse compactRegion(RpcController controller,
CompactRegionRequest request)
throws ServiceException
controller - the RPC controllerrequest - the requestServiceExceptionpublic FlushRegionResponse flushRegion(RpcController controller,
FlushRegionRequest request)
throws ServiceException
controller - the RPC controllerrequest - the requestServiceExceptionpublic GetOnlineRegionResponse getOnlineRegion(RpcController controller,
GetOnlineRegionRequest request)
throws ServiceException
ServiceExceptionpublic GetRegionInfoResponse getRegionInfo(RpcController controller,
GetRegionInfoRequest request)
throws ServiceException
ServiceExceptionpublic GetRegionLoadResponse getRegionLoad(RpcController controller,
GetRegionLoadRequest request)
throws ServiceException
ServiceExceptionpublic ClearCompactionQueuesResponse clearCompactionQueues(RpcController controller,
ClearCompactionQueuesRequest request)
throws ServiceException
ServiceExceptionpublic GetServerInfoResponse getServerInfo(RpcController controller,
GetServerInfoRequest request)
throws ServiceException
controller - the RPC controllerrequest - the requestServiceExceptionpublic GetStoreFileResponse getStoreFile(RpcController controller,
GetStoreFileRequest request)
throws ServiceException
ServiceExceptionpublic OpenRegionResponse openRegion(RpcController controller,
OpenRegionRequest request)
throws 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.
controller - the RPC controllerrequest - the requestServiceExceptionpublic WarmupRegionResponse warmupRegion(RpcController controller,
WarmupRegionRequest request)
throws ServiceException
controller - the RPC controllerrequest - the requestServiceExceptionpublic ReplicateWALEntryResponse replay(RpcController controller,
ReplicateWALEntryRequest request)
throws ServiceException
controller - the RPC controllerrequest - the requestServiceExceptionpublic ReplicateWALEntryResponse replicateWALEntry(RpcController controller,
ReplicateWALEntryRequest request)
throws ServiceException
controller - the RPC controllerrequest - the requestServiceExceptionpublic RollWALWriterResponse rollWALWriter(RpcController controller,
RollWALWriterRequest request)
throws ServiceException
controller - the RPC controllerrequest - the requestServiceExceptionpublic StopServerResponse stopServer(RpcController controller,
StopServerRequest request)
throws ServiceException
controller - the RPC controllerrequest - the requestServiceExceptionpublic UpdateFavoredNodesResponse updateFavoredNodes(RpcController controller,
UpdateFavoredNodesRequest request)
throws ServiceException
ServiceExceptionpublic BulkLoadHFileResponse bulkLoadHFile(RpcController controller,
BulkLoadHFileRequest request)
throws ServiceException
ServiceException - if failed unrecoverablypublic PrepareBulkLoadResponse prepareBulkLoad(RpcController controller,
PrepareBulkLoadRequest request)
throws ServiceException
ServiceExceptionpublic CleanupBulkLoadResponse cleanupBulkLoad(RpcController controller,
CleanupBulkLoadRequest request)
throws ServiceException
ServiceExceptionpublic CoprocessorServiceResponse execService(RpcController controller,
CoprocessorServiceRequest request)
throws ServiceException
ServiceExceptionpublic GetResponse get(RpcController controller,
GetRequest request)
throws ServiceException
controller - the RPC controllerrequest - the get requestServiceExceptionpublic MultiResponse multi(RpcController rpcc,
MultiRequest request)
throws ServiceException
rpcc - the RPC controllerrequest - the multi requestServiceExceptionpublic MutateResponse mutate(RpcController rpcc,
MutateRequest request)
throws ServiceException
rpcc - the RPC controllerrequest - the mutate requestServiceExceptionpublic ScanResponse scan(RpcController controller,
ScanRequest request)
throws ServiceException
controller - the RPC controllerrequest - the scan requestServiceExceptionpublic CoprocessorServiceResponse execRegionServerService(RpcController controller,
CoprocessorServiceRequest request)
throws ServiceException
ServiceExceptionpublic UpdateConfigurationResponse updateConfiguration(RpcController controller,
UpdateConfigurationRequest request)
throws ServiceException
ServiceExceptionpublic GetSpaceQuotaSnapshotsResponse getSpaceQuotaSnapshots(RpcController controller,
GetSpaceQuotaSnapshotsRequest request)
throws ServiceException
ServiceExceptionpublic ExecuteProceduresResponse executeProcedures(RpcController controller,
ExecuteProceduresRequest request)
throws ServiceException
ServiceExceptionpublic ClearRegionBlockCacheResponse clearRegionBlockCache(RpcController controller,
ClearRegionBlockCacheRequest request)