Package org.apache.hadoop.hbase
Class HBaseRpcServicesBase<S extends HBaseServerBase<?>>
java.lang.Object
org.apache.hadoop.hbase.HBaseRpcServicesBase<S>
- All Implemented Interfaces:
ConfigurationObserver
,HBaseRPCErrorHandler
,PriorityFunction
,org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface
,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.BlockingInterface
- Direct Known Subclasses:
MasterRpcServices
,RSRpcServices
@Private
public abstract class HBaseRpcServicesBase<S extends HBaseServerBase<?>>
extends Object
implements org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.BlockingInterface, org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface, HBaseRPCErrorHandler, PriorityFunction, ConfigurationObserver
Base class for Master and RegionServer RpcServices.
-
Field Summary
Modifier and TypeFieldDescriptionprivate AccessChecker
static final String
static final int
private final InetSocketAddress
private static final org.slf4j.Logger
protected final PriorityFunction
protected final RpcServer
protected final S
private ZKPermissionWatcher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if an OOME and, if so, abort immediately to avoid creating more objects.org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearSlowLogResponses
clearSlowLogsResponses
(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearSlowLogResponseRequest request) protected abstract PriorityFunction
protected abstract boolean
org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetActiveMasterResponse
getActiveMaster
(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetActiveMasterRequest request) final org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetBootstrapNodesResponse
getBootstrapNodes
(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetBootstrapNodesRequest request) org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetClusterIdResponse
getClusterId
(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetClusterIdRequest request) org.apache.hadoop.conf.Configuration
long
getDeadline
(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param) Returns the deadline of the specified request.protected abstract int
protected abstract DNS.ServerType
protected abstract String
getHostname
(org.apache.hadoop.conf.Configuration conf, String defaultHostname) org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.LogEntry
getLogEntries
(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.LogRequest request) org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetMastersResponse
getMasters
(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetMastersRequest request) org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetMetaRegionLocationsResponse
getMetaRegionLocations
(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetMetaRegionLocationsRequest request) protected abstract String
int
getPriority
(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param, User user) Returns the 'priority type' of the specified request.protected abstract Class<?>
getRpcSchedulerFactoryClass
(org.apache.hadoop.conf.Configuration conf) protected abstract List<RpcServer.BlockingServiceAndInterface>
private List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload>
getSlowLogPayloads
(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request, NamedQueueRecorder namedQueueRecorder) protected final void
internalStart
(ZKWatcher zkWatcher) protected final void
void
onConfigurationChange
(org.apache.hadoop.conf.Configuration conf) This method would be called by theConfigurationManager
object when theConfiguration
object is reloaded from disk.protected final void
requirePermission
(String request, Permission.Action perm) org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.UpdateConfigurationResponse
updateConfiguration
(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.UpdateConfigurationRequest request) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface
clearCompactionQueues, clearRegionBlockCache, closeRegion, compactionSwitch, compactRegion, executeProcedures, flushRegion, getCachedFilesList, getOnlineRegion, getRegionInfo, getRegionLoad, getServerInfo, getSpaceQuotaSnapshots, getStoreFile, openRegion, replay, replicateToReplica, replicateWALEntry, rollWALWriter, stopServer, updateFavoredNodes, warmupRegion
-
Field Details
-
LOG
-
CLIENT_BOOTSTRAP_NODE_LIMIT
- See Also:
-
DEFAULT_CLIENT_BOOTSTRAP_NODE_LIMIT
- See Also:
-
server
-
rpcServer
-
isa
-
priority
-
accessChecker
-
zkPermissionWatcher
-
-
Constructor Details
-
HBaseRpcServicesBase
- Throws:
IOException
-
-
Method Details
-
defaultReservoirEnabled
-
getDNSServerType
-
getHostname
protected abstract String getHostname(org.apache.hadoop.conf.Configuration conf, String defaultHostname) -
getPortConfigName
-
getDefaultPort
-
createPriority
-
getRpcSchedulerFactoryClass
-
getServices
-
internalStart
-
requirePermission
- Throws:
IOException
-
getAccessChecker
-
getZkPermissionWatcher
-
internalStop
-
getConfiguration
-
getServer
-
getSocketAddress
-
getRpcServer
-
getRpcScheduler
-
getPriority
public int getPriority(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param, User user) Description copied from interface:PriorityFunction
Returns the 'priority type' of the specified request. The returned value is mainly used to select the dispatch queue.- Specified by:
getPriority
in interfacePriorityFunction
- Returns:
- Priority of this request.
-
getDeadline
public long getDeadline(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param) Description copied from interface:PriorityFunction
Returns the deadline of the specified request. The returned value is used to sort the dispatch queue.- Specified by:
getDeadline
in interfacePriorityFunction
- Returns:
- Deadline of this request. 0 now, otherwise msec of 'delay'
-
checkOOME
Check if an OOME and, if so, abort immediately to avoid creating more objects.- Specified by:
checkOOME
in interfaceHBaseRPCErrorHandler
- Parameters:
e
- the throwable- Returns:
- True if we OOME'd and are aborting.
-
onConfigurationChange
Description copied from interface:ConfigurationObserver
This method would be called by theConfigurationManager
object when theConfiguration
object is reloaded from disk.- Specified by:
onConfigurationChange
in interfaceConfigurationObserver
-
getClusterId
public org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetClusterIdResponse getClusterId(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetClusterIdRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
getClusterId
in interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.BlockingInterface
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
getActiveMaster
public org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetActiveMasterResponse getActiveMaster(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetActiveMasterRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
getActiveMaster
in interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.BlockingInterface
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
getMasters
public org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetMastersResponse getMasters(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetMastersRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
getMasters
in interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.BlockingInterface
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
getMetaRegionLocations
public org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetMetaRegionLocationsResponse getMetaRegionLocations(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetMetaRegionLocationsRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
getMetaRegionLocations
in interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.BlockingInterface
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
getBootstrapNodes
public final org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetBootstrapNodesResponse getBootstrapNodes(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetBootstrapNodesRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
getBootstrapNodes
in interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.BlockingInterface
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
updateConfiguration
public org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.UpdateConfigurationResponse updateConfiguration(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.UpdateConfigurationRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
updateConfiguration
in interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
clearSlowLogsResponses
public org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearSlowLogResponses clearSlowLogsResponses(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ClearSlowLogResponseRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
clearSlowLogsResponses
in interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
getSlowLogPayloads
private List<org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog.SlowLogPayload> getSlowLogPayloads(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest request, NamedQueueRecorder namedQueueRecorder) -
getLogEntries
public org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.LogEntry getLogEntries(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.LogRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Specified by:
getLogEntries
in interfaceorg.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface
- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-