Package org.apache.hadoop.hbase.ipc
Class FifoRpcScheduler
java.lang.Object
org.apache.hadoop.hbase.ipc.RpcScheduler
org.apache.hadoop.hbase.ipc.FifoRpcScheduler
- Direct Known Subclasses:
MasterFifoRpcScheduler
A very simple RpcScheduler} that serves incoming requests in order. This can be used for
HMaster, where no prioritization is needed.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.hadoop.hbase.ipc.RpcScheduler
RpcScheduler.Context -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ThreadPoolExecutorprotected final intprivate static final org.slf4j.Loggerprotected final intprotected final AtomicIntegerFields inherited from class org.apache.hadoop.hbase.ipc.RpcScheduler
IPC_SERVER_BULKLOAD_MAX_CALLQUEUE_LENGTH, IPC_SERVER_MAX_CALLQUEUE_LENGTH, IPC_SERVER_PRIORITY_MAX_CALLQUEUE_LENGTH, IPC_SERVER_REPLICATION_MAX_CALLQUEUE_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionFifoRpcScheduler(org.apache.hadoop.conf.Configuration conf, int handlerCount) -
Method Summary
Modifier and TypeMethodDescriptionbooleandispatch(CallRunner task) Dispatches an RPC request asynchronously.protected booleanexecuteRpcCall(ThreadPoolExecutor executor, AtomicInteger queueSize, CallRunner task) intRetrieves the number of active bulkload handler.intRetrieves the number of active general handler.intRetrieves the number of active meta priority handler.intRetrieves the number of active priority handler.intRetrieves the number of active write rpc handler when use RWQueueRpcExecutor.intRetrieves the number of active replication handler.intRetrieves the total number of active handler.intRetrieves the number of active write rpc handler when use RWQueueRpcExecutor.intRetrieves the number of active write rpc handler when use RWQueueRpcExecutor.intRetrieves length of the bulkload queue for metrics.protected StringgetCallMethod(CallRunner task) Get call queue informationintRetrieves length of the general queue for metrics.intRetrieves length of the meta priority queue for metrics.longIf 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.longIf 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.intRetrieves length of the priority queue for metrics.intRetrieves length of the read queue for metrics when use RWQueueRpcExecutor.intRetrieves length of the replication queue for metrics.intRetrieves length of the scan queue for metrics when use RWQueueRpcExecutor.intRetrieves length of the write queue for metrics when use RWQueueRpcExecutor.voidinit(RpcScheduler.Context context) Does some quick initialization.voidstart()Prepares for request serving.voidstop()Stops serving new requests.protected voidupdateMethodCountAndSizeByQueue(BlockingQueue<Runnable> queue, HashMap<String, Long> methodCount, HashMap<String, Long> methodSize)
-
Field Details
-
LOG
-
handlerCount
-
maxQueueLength
-
queueSize
-
executor
-
-
Constructor Details
-
FifoRpcScheduler
-
-
Method Details
-
init
Description copied from class:RpcSchedulerDoes some quick initialization. Heavy tasks (e.g. starting threads) should be done inRpcScheduler.start(). This method is called beforestart.- Specified by:
initin classRpcScheduler- Parameters:
context- provides methods to retrieve runtime information from
-
start
Description copied from class:RpcSchedulerPrepares for request serving. An implementation may start some handler threads here.- Specified by:
startin classRpcScheduler
-
stop
Description copied from class:RpcSchedulerStops serving new requests.- Specified by:
stopin classRpcScheduler
-
dispatch
Description copied from class:RpcSchedulerDispatches an RPC request asynchronously. An implementation is free to choose to process the request immediately or delay it for later processing.- Specified by:
dispatchin classRpcScheduler- Parameters:
task- the request to be dispatched
-
executeRpcCall
protected boolean executeRpcCall(ThreadPoolExecutor executor, AtomicInteger queueSize, CallRunner task) -
getGeneralQueueLength
Description copied from class:RpcSchedulerRetrieves length of the general queue for metrics.- Specified by:
getGeneralQueueLengthin classRpcScheduler
-
getPriorityQueueLength
Description copied from class:RpcSchedulerRetrieves length of the priority queue for metrics.- Specified by:
getPriorityQueueLengthin classRpcScheduler
-
getReplicationQueueLength
Description copied from class:RpcSchedulerRetrieves length of the replication queue for metrics.- Specified by:
getReplicationQueueLengthin classRpcScheduler
-
getBulkLoadQueueLength
Description copied from class:RpcSchedulerRetrieves length of the bulkload queue for metrics.- Specified by:
getBulkLoadQueueLengthin classRpcScheduler
-
getActiveRpcHandlerCount
Description copied from class:RpcSchedulerRetrieves the total number of active handler.- Specified by:
getActiveRpcHandlerCountin classRpcScheduler
-
getActiveGeneralRpcHandlerCount
Description copied from class:RpcSchedulerRetrieves the number of active general handler.- Specified by:
getActiveGeneralRpcHandlerCountin classRpcScheduler
-
getActivePriorityRpcHandlerCount
Description copied from class:RpcSchedulerRetrieves the number of active priority handler.- Specified by:
getActivePriorityRpcHandlerCountin classRpcScheduler
-
getActiveReplicationRpcHandlerCount
Description copied from class:RpcSchedulerRetrieves the number of active replication handler.- Specified by:
getActiveReplicationRpcHandlerCountin classRpcScheduler
-
getActiveBulkLoadRpcHandlerCount
Description copied from class:RpcSchedulerRetrieves the number of active bulkload handler.- Specified by:
getActiveBulkLoadRpcHandlerCountin classRpcScheduler
-
getActiveMetaPriorityRpcHandlerCount
Description copied from class:RpcSchedulerRetrieves the number of active meta priority handler.- Specified by:
getActiveMetaPriorityRpcHandlerCountin classRpcScheduler
-
getNumGeneralCallsDropped
Description copied from class:RpcSchedulerIf 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.- Specified by:
getNumGeneralCallsDroppedin classRpcScheduler
-
getNumLifoModeSwitches
Description copied from class:RpcSchedulerIf 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.- Specified by:
getNumLifoModeSwitchesin classRpcScheduler
-
getWriteQueueLength
Description copied from class:RpcSchedulerRetrieves length of the write queue for metrics when use RWQueueRpcExecutor.- Specified by:
getWriteQueueLengthin classRpcScheduler
-
getReadQueueLength
Description copied from class:RpcSchedulerRetrieves length of the read queue for metrics when use RWQueueRpcExecutor.- Specified by:
getReadQueueLengthin classRpcScheduler
-
getScanQueueLength
Description copied from class:RpcSchedulerRetrieves length of the scan queue for metrics when use RWQueueRpcExecutor.- Specified by:
getScanQueueLengthin classRpcScheduler
-
getActiveWriteRpcHandlerCount
Description copied from class:RpcSchedulerRetrieves the number of active write rpc handler when use RWQueueRpcExecutor.- Specified by:
getActiveWriteRpcHandlerCountin classRpcScheduler
-
getActiveReadRpcHandlerCount
Description copied from class:RpcSchedulerRetrieves the number of active write rpc handler when use RWQueueRpcExecutor.- Specified by:
getActiveReadRpcHandlerCountin classRpcScheduler
-
getActiveScanRpcHandlerCount
Description copied from class:RpcSchedulerRetrieves the number of active write rpc handler when use RWQueueRpcExecutor.- Specified by:
getActiveScanRpcHandlerCountin classRpcScheduler
-
getMetaPriorityQueueLength
Description copied from class:RpcSchedulerRetrieves length of the meta priority queue for metrics.- Specified by:
getMetaPriorityQueueLengthin classRpcScheduler
-
getCallQueueInfo
Description copied from class:RpcSchedulerGet call queue information- Specified by:
getCallQueueInfoin classRpcScheduler
-
updateMethodCountAndSizeByQueue
protected void updateMethodCountAndSizeByQueue(BlockingQueue<Runnable> queue, HashMap<String, Long> methodCount, HashMap<String, Long> methodSize) -
getCallMethod
-