@InterfaceAudience.Private public class RSRpcServices extends Object implements HBaseRPCErrorHandler, AdminProtos.AdminService.BlockingInterface, ClientProtos.ClientService.BlockingInterface, PriorityFunction
Modifier and Type | Field and Description |
---|---|
protected static Log |
LOG |
static String |
REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS
RPC scheduler to use for the region server.
|
Constructor and Description |
---|
RSRpcServices(HRegionServer rs) |
protected static final Log LOG
public static final String REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS
public RSRpcServices(HRegionServer rs) throws IOException
IOException
public static String getHostname(Configuration conf, boolean isMaster) throws UnknownHostException
UnknownHostException
public PriorityFunction getPriority()
protected void checkOpen() throws IOException
IOException
protected List<RpcServer.BlockingServiceAndInterface> getServices()
public InetSocketAddress getSocketAddress()
public int getPriority(RPCProtos.RequestHeader header, Message param)
PriorityFunction
getPriority
in interface PriorityFunction
public long getDeadline(RPCProtos.RequestHeader header, Message param)
PriorityFunction
getDeadline
in interface PriorityFunction
public boolean checkOOME(Throwable e)
HBaseRPCErrorHandler
checkOOME
in interface HBaseRPCErrorHandler
e
- the throwablepublic AdminProtos.CloseRegionResponse closeRegion(RpcController controller, AdminProtos.CloseRegionRequest request) throws ServiceException
closeRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.CompactRegionResponse compactRegion(RpcController controller, AdminProtos.CompactRegionRequest request) throws ServiceException
compactRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.FlushRegionResponse flushRegion(RpcController controller, AdminProtos.FlushRegionRequest request) throws ServiceException
flushRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.GetOnlineRegionResponse getOnlineRegion(RpcController controller, AdminProtos.GetOnlineRegionRequest request) throws ServiceException
getOnlineRegion
in interface AdminProtos.AdminService.BlockingInterface
ServiceException
public AdminProtos.GetRegionInfoResponse getRegionInfo(RpcController controller, AdminProtos.GetRegionInfoRequest request) throws ServiceException
getRegionInfo
in interface AdminProtos.AdminService.BlockingInterface
ServiceException
public AdminProtos.GetServerInfoResponse getServerInfo(RpcController controller, AdminProtos.GetServerInfoRequest request) throws ServiceException
getServerInfo
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.GetStoreFileResponse getStoreFile(RpcController controller, AdminProtos.GetStoreFileRequest request) throws ServiceException
getStoreFile
in interface AdminProtos.AdminService.BlockingInterface
ServiceException
public AdminProtos.MergeRegionsResponse mergeRegions(RpcController controller, AdminProtos.MergeRegionsRequest request) throws ServiceException
mergeRegions
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.OpenRegionResponse openRegion(RpcController controller, AdminProtos.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.
openRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.WarmupRegionResponse warmupRegion(RpcController controller, AdminProtos.WarmupRegionRequest request) throws ServiceException
warmupRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.ReplicateWALEntryResponse replay(RpcController controller, AdminProtos.ReplicateWALEntryRequest request) throws ServiceException
replay
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.ReplicateWALEntryResponse replicateWALEntry(RpcController controller, AdminProtos.ReplicateWALEntryRequest request) throws ServiceException
replicateWALEntry
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.RollWALWriterResponse rollWALWriter(RpcController controller, AdminProtos.RollWALWriterRequest request) throws ServiceException
rollWALWriter
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.SplitRegionResponse splitRegion(RpcController controller, AdminProtos.SplitRegionRequest request) throws ServiceException
splitRegion
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.StopServerResponse stopServer(RpcController controller, AdminProtos.StopServerRequest request) throws ServiceException
stopServer
in interface AdminProtos.AdminService.BlockingInterface
controller
- the RPC controllerrequest
- the requestServiceException
public AdminProtos.UpdateFavoredNodesResponse updateFavoredNodes(RpcController controller, AdminProtos.UpdateFavoredNodesRequest request) throws ServiceException
updateFavoredNodes
in interface AdminProtos.AdminService.BlockingInterface
ServiceException
public ClientProtos.BulkLoadHFileResponse bulkLoadHFile(RpcController controller, ClientProtos.BulkLoadHFileRequest request) throws ServiceException
bulkLoadHFile
in interface ClientProtos.ClientService.BlockingInterface
IOException
- if failed unrecoverablyServiceException
public ClientProtos.CoprocessorServiceResponse execService(RpcController controller, ClientProtos.CoprocessorServiceRequest request) throws ServiceException
execService
in interface ClientProtos.ClientService.BlockingInterface
ServiceException
public ClientProtos.GetResponse get(RpcController controller, ClientProtos.GetRequest request) throws ServiceException
get
in interface ClientProtos.ClientService.BlockingInterface
controller
- the RPC controllerrequest
- the get requestServiceException
public ClientProtos.MultiResponse multi(RpcController rpcc, ClientProtos.MultiRequest request) throws ServiceException
multi
in interface ClientProtos.ClientService.BlockingInterface
rpcc
- the RPC controllerrequest
- the multi requestServiceException
public ClientProtos.MutateResponse mutate(RpcController rpcc, ClientProtos.MutateRequest request) throws ServiceException
mutate
in interface ClientProtos.ClientService.BlockingInterface
rpcc
- the RPC controllerrequest
- the mutate requestServiceException
public ClientProtos.ScanResponse scan(RpcController controller, ClientProtos.ScanRequest request) throws ServiceException
scan
in interface ClientProtos.ClientService.BlockingInterface
controller
- the RPC controllerrequest
- the scan requestServiceException
public ClientProtos.CoprocessorServiceResponse execRegionServerService(RpcController controller, ClientProtos.CoprocessorServiceRequest request) throws ServiceException
execRegionServerService
in interface ClientProtos.ClientService.BlockingInterface
ServiceException
public AdminProtos.UpdateConfigurationResponse updateConfiguration(RpcController controller, AdminProtos.UpdateConfigurationRequest request) throws ServiceException
updateConfiguration
in interface AdminProtos.AdminService.BlockingInterface
ServiceException