Package org.apache.hadoop.hbase.ipc
Class RWQueueRpcExecutor
java.lang.Object
org.apache.hadoop.hbase.ipc.RpcExecutor
org.apache.hadoop.hbase.ipc.RWQueueRpcExecutor
- Direct Known Subclasses:
FastPathRWQueueRpcExecutor,MetaRWQueueRpcExecutor
@LimitedPrivate({"Coprocesssor","Phoenix"})
@Evolving
public class RWQueueRpcExecutor
extends RpcExecutor
RPC Executor that uses different queues for reads and writes. With the options to use different
queues/executors for gets and scans. Each handler has its own queue and there is no stealing.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicIntegerprivate final AtomicIntegerprivate final AtomicIntegerstatic final Stringstatic final Stringprivate static final org.slf4j.Loggerprivate final intprivate final intprivate final intprivate final QueueBalancerprivate final intprivate final QueueBalancerprivate final intprivate final QueueBalancerprivate final intFields 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
ConstructorsConstructorDescriptionRWQueueRpcExecutor(String name, int handlerCount, int maxQueueLength, PriorityFunction priority, org.apache.hadoop.conf.Configuration conf, Abortable abortable) -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcalcNumReaders(int count, float readShare) private static intcalcNumWriters(int count, float readShare) protected intcomputeNumCallQueues(int handlerCount, float callQueuesHandlersFactor) booleandispatch(CallRunner callTask) Add the request to the executor queueprotected booleandispatchTo(boolean toWriteQueue, boolean toScanQueue, CallRunner callTask) intintintintprotected int(package private) QueueBalancerintprotected floatgetReadShare(org.apache.hadoop.conf.Configuration conf) (package private) QueueBalancerintprotected floatgetScanShare(org.apache.hadoop.conf.Configuration conf) (package private) QueueBalancerintprivate booleanisScanRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param) protected booleanisWriteRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param) voidonConfigurationChange(org.apache.hadoop.conf.Configuration conf) private voidpropagateBalancerConfigChange(QueueBalancer balancer, org.apache.hadoop.conf.Configuration conf) protected booleanprotected voidstartHandlers(int port) Methods inherited from class org.apache.hadoop.hbase.ipc.RpcExecutor
getBalancer, getCallQueueCountsSummary, getCallQueueHandlerFactor, getCallQueueSizeSummary, getHandler, getName, getNumGeneralCallsDropped, getNumLifoModeSwitches, getQueueLength, getQueues, initializeQueues, isCodelQueueType, isDeadlineQueueType, isFifoQueueType, isPluggableQueueType, isPluggableQueueWithFastPath, resizeQueues, start, startHandlers, stop
-
Field Details
-
LOG
-
CALL_QUEUE_READ_SHARE_CONF_KEY
- See Also:
-
CALL_QUEUE_SCAN_SHARE_CONF_KEY
- See Also:
-
writeBalancer
-
readBalancer
-
scanBalancer
-
writeHandlersCount
-
readHandlersCount
-
scanHandlersCount
-
numWriteQueues
-
numReadQueues
-
numScanQueues
-
activeWriteHandlerCount
-
activeReadHandlerCount
-
activeScanHandlerCount
-
-
Constructor Details
-
RWQueueRpcExecutor
public RWQueueRpcExecutor(String name, int handlerCount, int maxQueueLength, PriorityFunction priority, org.apache.hadoop.conf.Configuration conf, Abortable abortable)
-
-
Method Details
-
computeNumCallQueues
- Overrides:
computeNumCallQueuesin classRpcExecutor
-
startHandlers
- Overrides:
startHandlersin classRpcExecutor
-
dispatch
Description copied from class:RpcExecutorAdd the request to the executor queue- Specified by:
dispatchin classRpcExecutor
-
dispatchTo
-
getWriteQueueLength
- Overrides:
getWriteQueueLengthin classRpcExecutor
-
getReadQueueLength
- Overrides:
getReadQueueLengthin classRpcExecutor
-
getScanQueueLength
- Overrides:
getScanQueueLengthin classRpcExecutor
-
getActiveHandlerCount
- Overrides:
getActiveHandlerCountin classRpcExecutor
-
getActiveWriteHandlerCount
- Overrides:
getActiveWriteHandlerCountin classRpcExecutor
-
getActiveReadHandlerCount
- Overrides:
getActiveReadHandlerCountin classRpcExecutor
-
getActiveScanHandlerCount
- Overrides:
getActiveScanHandlerCountin classRpcExecutor
-
isWriteRequest
protected boolean isWriteRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param) -
getWriteBalancer
-
getReadBalancer
-
getScanBalancer
-
isScanRequest
private boolean isScanRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param) -
shouldDispatchToScanQueue
-
calcNumWriters
-
calcNumReaders
-
onConfigurationChange
- Overrides:
onConfigurationChangein classRpcExecutor
-
propagateBalancerConfigChange
private void propagateBalancerConfigChange(QueueBalancer balancer, org.apache.hadoop.conf.Configuration conf) -
getNumScanQueues
-