Package org.apache.hadoop.hbase.ipc
Class FastPathBalancedQueueRpcExecutor
java.lang.Object
org.apache.hadoop.hbase.ipc.RpcExecutor
org.apache.hadoop.hbase.ipc.BalancedQueueRpcExecutor
org.apache.hadoop.hbase.ipc.FastPathBalancedQueueRpcExecutor
Balanced queue executor with a fastpath. Because this is FIFO, it has no respect for ordering so
a fast path skipping the queuing of Calls if an Handler is available, is possible. Just pass the
Call direct to waiting Handler thread. Try to keep the hot Handlers bubbling rather than let them
go cold and lose context. Idea taken from Apace Kudu (incubating). See
https://gerrit.cloudera.org/#/c/2938/7/src/kudu/rpc/service_queue.h
-
Field Summary
FieldsFields inherited from class org.apache.hadoop.hbase.ipc.RpcExecutor
CALL_QUEUE_CODEL_DEFAULT_INTERVAL, CALL_QUEUE_CODEL_DEFAULT_LIFO_THRESHOLD, CALL_QUEUE_CODEL_DEFAULT_TARGET_DELAY, CALL_QUEUE_CODEL_INTERVAL, CALL_QUEUE_CODEL_LIFO_THRESHOLD, CALL_QUEUE_CODEL_TARGET_DELAY, CALL_QUEUE_HANDLER_FACTOR_CONF_KEY, CALL_QUEUE_QUEUE_BALANCER_CLASS, CALL_QUEUE_QUEUE_BALANCER_CLASS_DEFAULT, CALL_QUEUE_TYPE_CODEL_CONF_VALUE, CALL_QUEUE_TYPE_CONF_DEFAULT, CALL_QUEUE_TYPE_CONF_KEY, CALL_QUEUE_TYPE_DEADLINE_CONF_VALUE, CALL_QUEUE_TYPE_FIFO_CONF_VALUE, CALL_QUEUE_TYPE_PLUGGABLE_CONF_VALUE, currentQueueLimit, DEFAULT_CALL_QUEUE_SIZE_HARD_LIMIT, numCallQueues, PLUGGABLE_CALL_QUEUE_CLASS_NAME, PLUGGABLE_CALL_QUEUE_WITH_FAST_PATH_ENABLED, QUEUE_MAX_CALL_DELAY_CONF_KEY, queues -
Constructor Summary
ConstructorsConstructorDescriptionFastPathBalancedQueueRpcExecutor(String name, int handlerCount, int maxQueueLength, PriorityFunction priority, org.apache.hadoop.conf.Configuration conf, Abortable abortable) FastPathBalancedQueueRpcExecutor(String name, int handlerCount, String callQueueType, int maxQueueLength, PriorityFunction priority, org.apache.hadoop.conf.Configuration conf, Abortable abortable) -
Method Summary
Modifier and TypeMethodDescriptionbooleandispatch(CallRunner callTask) Add the request to the executor queueprotected RpcHandlergetHandler(String name, double handlerFailureThreshhold, int handlerCount, BlockingQueue<CallRunner> q, AtomicInteger activeHandlerCount, AtomicInteger failedHandlerCount, Abortable abortable) Override if providing alternate Handler implementation.private FastPathRpcHandlerReturns Pop a Handler instance if one available ready-to-go or else return null.Methods inherited from class org.apache.hadoop.hbase.ipc.BalancedQueueRpcExecutor
onConfigurationChangeMethods inherited from class org.apache.hadoop.hbase.ipc.RpcExecutor
computeNumCallQueues, getActiveHandlerCount, getActiveReadHandlerCount, getActiveScanHandlerCount, getActiveWriteHandlerCount, getBalancer, getCallQueueCountsSummary, getCallQueueHandlerFactor, getCallQueueSizeSummary, getName, getNumGeneralCallsDropped, getNumLifoModeSwitches, getQueueLength, getQueues, getReadQueueLength, getScanQueueLength, getWriteQueueLength, initializeQueues, isCodelQueueType, isDeadlineQueueType, isFifoQueueType, isPluggableQueueType, isPluggableQueueWithFastPath, resizeQueues, start, startHandlers, startHandlers, stop
-
Field Details
-
fastPathHandlerStack
-
-
Constructor Details
-
FastPathBalancedQueueRpcExecutor
public FastPathBalancedQueueRpcExecutor(String name, int handlerCount, int maxQueueLength, PriorityFunction priority, org.apache.hadoop.conf.Configuration conf, Abortable abortable) -
FastPathBalancedQueueRpcExecutor
public FastPathBalancedQueueRpcExecutor(String name, int handlerCount, String callQueueType, int maxQueueLength, PriorityFunction priority, org.apache.hadoop.conf.Configuration conf, Abortable abortable)
-
-
Method Details
-
getHandler
protected RpcHandler getHandler(String name, double handlerFailureThreshhold, int handlerCount, BlockingQueue<CallRunner> q, AtomicInteger activeHandlerCount, AtomicInteger failedHandlerCount, Abortable abortable) Description copied from class:RpcExecutorOverride if providing alternate Handler implementation.- Overrides:
getHandlerin classRpcExecutor
-
dispatch
Description copied from class:RpcExecutorAdd the request to the executor queue- Overrides:
dispatchin classBalancedQueueRpcExecutor
-
popReadyHandler
Returns Pop a Handler instance if one available ready-to-go or else return null.
-