Class RpcScheduler

java.lang.Object
org.apache.hadoop.hbase.ipc.RpcScheduler
Direct Known Subclasses:
DelegatingRpcScheduler, FifoRpcScheduler, SimpleRpcScheduler

@LimitedPrivate({"Coprocesssor","Phoenix"}) @Evolving public abstract class RpcScheduler extends Object
An interface for RPC request scheduling algorithm.
  • Field Details

  • Constructor Details

  • Method Details

    • init

      public abstract void init(RpcScheduler.Context context)
      Does some quick initialization. Heavy tasks (e.g. starting threads) should be done in start(). This method is called before start.
      Parameters:
      context - provides methods to retrieve runtime information from
    • start

      public abstract void start()
      Prepares for request serving. An implementation may start some handler threads here.
    • stop

      public abstract void stop()
      Stops serving new requests.
    • dispatch

      public abstract boolean dispatch(CallRunner task)
      Dispatches an RPC request asynchronously. An implementation is free to choose to process the request immediately or delay it for later processing.
      Parameters:
      task - the request to be dispatched
    • getCallQueueInfo

      public abstract CallQueueInfo getCallQueueInfo()
      Get call queue information
    • getGeneralQueueLength

      public abstract int getGeneralQueueLength()
      Retrieves length of the general queue for metrics.
    • getPriorityQueueLength

      public abstract int getPriorityQueueLength()
      Retrieves length of the priority queue for metrics.
    • getMetaPriorityQueueLength

      public abstract int getMetaPriorityQueueLength()
      Retrieves length of the meta priority queue for metrics.
    • getReplicationQueueLength

      public abstract int getReplicationQueueLength()
      Retrieves length of the replication queue for metrics.
    • getBulkLoadQueueLength

      public abstract int getBulkLoadQueueLength()
      Retrieves length of the bulkload queue for metrics.
    • getActiveRpcHandlerCount

      public abstract int getActiveRpcHandlerCount()
      Retrieves the total number of active handler.
    • getActiveGeneralRpcHandlerCount

      public abstract int getActiveGeneralRpcHandlerCount()
      Retrieves the number of active general handler.
    • getActivePriorityRpcHandlerCount

      public abstract int getActivePriorityRpcHandlerCount()
      Retrieves the number of active priority handler.
    • getActiveMetaPriorityRpcHandlerCount

      public abstract int getActiveMetaPriorityRpcHandlerCount()
      Retrieves the number of active meta priority handler.
    • getActiveReplicationRpcHandlerCount

      public abstract int getActiveReplicationRpcHandlerCount()
      Retrieves the number of active replication handler.
    • getActiveBulkLoadRpcHandlerCount

      public abstract int getActiveBulkLoadRpcHandlerCount()
      Retrieves the number of active bulkload handler.
    • getNumGeneralCallsDropped

      public abstract long getNumGeneralCallsDropped()
      If CoDel-based RPC executors are used, retrieves the number of Calls that were dropped from general queue because RPC executor is under high load; returns 0 otherwise.
    • getNumLifoModeSwitches

      public abstract long getNumLifoModeSwitches()
      If CoDel-based RPC executors are used, retrieves the number of Calls that were picked from the tail of the queue (indicating adaptive LIFO mode, when in the period of overloade we serve last requests first); returns 0 otherwise.
    • getWriteQueueLength

      public abstract int getWriteQueueLength()
      Retrieves length of the write queue for metrics when use RWQueueRpcExecutor.
    • getReadQueueLength

      public abstract int getReadQueueLength()
      Retrieves length of the read queue for metrics when use RWQueueRpcExecutor.
    • getScanQueueLength

      public abstract int getScanQueueLength()
      Retrieves length of the scan queue for metrics when use RWQueueRpcExecutor.
    • getActiveWriteRpcHandlerCount

      public abstract int getActiveWriteRpcHandlerCount()
      Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.
    • getActiveReadRpcHandlerCount

      public abstract int getActiveReadRpcHandlerCount()
      Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.
    • getActiveScanRpcHandlerCount

      public abstract int getActiveScanRpcHandlerCount()
      Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.