Package org.apache.hadoop.hbase.ipc
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Exposes runtime information of aRpcServer
that aRpcScheduler
may need. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
dispatch
(CallRunner task) Dispatches an RPC request asynchronously.abstract int
Retrieves the number of active bulkload handler.abstract int
Retrieves the number of active general handler.abstract int
Retrieves the number of active meta priority handler.abstract int
Retrieves the number of active priority handler.abstract int
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.abstract int
Retrieves the number of active replication handler.abstract int
Retrieves the total number of active handler.abstract int
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.abstract int
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.abstract int
Retrieves length of the bulkload queue for metrics.abstract CallQueueInfo
Get call queue informationabstract int
Retrieves length of the general queue for metrics.abstract int
Retrieves length of the meta priority queue for metrics.abstract long
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.abstract long
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.abstract int
Retrieves length of the priority queue for metrics.abstract int
Retrieves length of the read queue for metrics when use RWQueueRpcExecutor.abstract int
Retrieves length of the replication queue for metrics.abstract int
Retrieves length of the scan queue for metrics when use RWQueueRpcExecutor.abstract int
Retrieves length of the write queue for metrics when use RWQueueRpcExecutor.abstract void
init
(RpcScheduler.Context context) Does some quick initialization.abstract void
start()
Prepares for request serving.abstract void
stop()
Stops serving new requests.
-
Field Details
-
IPC_SERVER_MAX_CALLQUEUE_LENGTH
- See Also:
-
IPC_SERVER_PRIORITY_MAX_CALLQUEUE_LENGTH
- See Also:
-
IPC_SERVER_REPLICATION_MAX_CALLQUEUE_LENGTH
- See Also:
-
IPC_SERVER_BULKLOAD_MAX_CALLQUEUE_LENGTH
- See Also:
-
-
Constructor Details
-
RpcScheduler
public RpcScheduler()
-
-
Method Details
-
init
Does some quick initialization. Heavy tasks (e.g. starting threads) should be done instart()
. This method is called beforestart
.- Parameters:
context
- provides methods to retrieve runtime information from
-
start
Prepares for request serving. An implementation may start some handler threads here. -
stop
Stops serving new requests. -
dispatch
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
Get call queue information -
getGeneralQueueLength
Retrieves length of the general queue for metrics. -
getPriorityQueueLength
Retrieves length of the priority queue for metrics. -
getMetaPriorityQueueLength
Retrieves length of the meta priority queue for metrics. -
getReplicationQueueLength
Retrieves length of the replication queue for metrics. -
getBulkLoadQueueLength
Retrieves length of the bulkload queue for metrics. -
getActiveRpcHandlerCount
Retrieves the total number of active handler. -
getActiveGeneralRpcHandlerCount
Retrieves the number of active general handler. -
getActivePriorityRpcHandlerCount
Retrieves the number of active priority handler. -
getActiveMetaPriorityRpcHandlerCount
Retrieves the number of active meta priority handler. -
getActiveReplicationRpcHandlerCount
Retrieves the number of active replication handler. -
getActiveBulkLoadRpcHandlerCount
Retrieves the number of active bulkload handler. -
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
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
Retrieves length of the write queue for metrics when use RWQueueRpcExecutor. -
getReadQueueLength
Retrieves length of the read queue for metrics when use RWQueueRpcExecutor. -
getScanQueueLength
Retrieves length of the scan queue for metrics when use RWQueueRpcExecutor. -
getActiveWriteRpcHandlerCount
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor. -
getActiveReadRpcHandlerCount
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor. -
getActiveScanRpcHandlerCount
Retrieves the number of active write rpc handler when use RWQueueRpcExecutor.
-