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

    Fields
    Modifier and Type
    Field
    Description
     
    static final String
     
    static final int
     
    private final InetSocketAddress
     
    private static final org.slf4j.Logger
     
    protected final PriorityFunction
     
    protected final RpcServer
     
    protected final S
     
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    HBaseRpcServicesBase(S server, String processName)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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)
     
     
     
     
    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
     
    protected final void
     
    void
    onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
    This method would be called by the ConfigurationManager object when the Configuration object is reloaded from disk.
    protected final void
     
    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

  • Constructor Details

  • Method Details

    • defaultReservoirEnabled

      protected abstract boolean defaultReservoirEnabled()
    • getDNSServerType

      protected abstract DNS.ServerType getDNSServerType()
    • getHostname

      protected abstract String getHostname(org.apache.hadoop.conf.Configuration conf, String defaultHostname)
    • getPortConfigName

      protected abstract String getPortConfigName()
    • getDefaultPort

      protected abstract int getDefaultPort()
    • createPriority

      protected abstract PriorityFunction createPriority()
    • getRpcSchedulerFactoryClass

      protected abstract Class<?> getRpcSchedulerFactoryClass(org.apache.hadoop.conf.Configuration conf)
    • getServices

    • internalStart

      protected final void internalStart(ZKWatcher zkWatcher)
    • requirePermission

      protected final void requirePermission(String request, Permission.Action perm) throws IOException
      Throws:
      IOException
    • getAccessChecker

    • getZkPermissionWatcher

    • internalStop

      protected final void internalStop()
    • getConfiguration

      public org.apache.hadoop.conf.Configuration getConfiguration()
    • getServer

      public S 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 interface PriorityFunction
      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 interface PriorityFunction
      Returns:
      Deadline of this request. 0 now, otherwise msec of 'delay'
    • checkOOME

      public boolean checkOOME(Throwable e)
      Check if an OOME and, if so, abort immediately to avoid creating more objects.
      Specified by:
      checkOOME in interface HBaseRPCErrorHandler
      Parameters:
      e - the throwable
      Returns:
      True if we OOME'd and are aborting.
    • onConfigurationChange

      public void onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
      Description copied from interface: ConfigurationObserver
      This method would be called by the ConfigurationManager object when the Configuration object is reloaded from disk.
      Specified by:
      onConfigurationChange in interface ConfigurationObserver
    • 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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.AdminService.BlockingInterface
      Throws:
      org.apache.hbase.thirdparty.com.google.protobuf.ServiceException