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
Modifier and TypeFieldDescriptionprivate final AtomicInteger
private final AtomicInteger
private final AtomicInteger
static final String
static final String
private static final org.slf4j.Logger
private final int
private final int
private final int
private final QueueBalancer
private final int
private final QueueBalancer
private final int
private final QueueBalancer
private final int
Fields 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
ConstructorDescriptionRWQueueRpcExecutor
(String name, int handlerCount, int maxQueueLength, PriorityFunction priority, org.apache.hadoop.conf.Configuration conf, Abortable abortable) -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
calcNumReaders
(int count, float readShare) private static int
calcNumWriters
(int count, float readShare) protected int
computeNumCallQueues
(int handlerCount, float callQueuesHandlersFactor) boolean
dispatch
(CallRunner callTask) Add the request to the executor queueprotected boolean
dispatchTo
(boolean toWriteQueue, boolean toScanQueue, CallRunner callTask) int
int
int
int
(package private) QueueBalancer
int
protected float
getReadShare
(org.apache.hadoop.conf.Configuration conf) (package private) QueueBalancer
int
protected float
getScanShare
(org.apache.hadoop.conf.Configuration conf) (package private) QueueBalancer
int
private boolean
isScanRequest
(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param) protected boolean
isWriteRequest
(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param) void
onConfigurationChange
(org.apache.hadoop.conf.Configuration conf) private void
propagateBalancerConfigChange
(QueueBalancer balancer, org.apache.hadoop.conf.Configuration conf) protected boolean
protected void
startHandlers
(int port) Methods inherited from class org.apache.hadoop.hbase.ipc.RpcExecutor
getBalancer, getCallQueueCountsSummary, 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:
computeNumCallQueues
in classRpcExecutor
-
startHandlers
- Overrides:
startHandlers
in classRpcExecutor
-
dispatch
Description copied from class:RpcExecutor
Add the request to the executor queue- Specified by:
dispatch
in classRpcExecutor
-
dispatchTo
-
getWriteQueueLength
- Overrides:
getWriteQueueLength
in classRpcExecutor
-
getReadQueueLength
- Overrides:
getReadQueueLength
in classRpcExecutor
-
getScanQueueLength
- Overrides:
getScanQueueLength
in classRpcExecutor
-
getActiveHandlerCount
- Overrides:
getActiveHandlerCount
in classRpcExecutor
-
getActiveWriteHandlerCount
- Overrides:
getActiveWriteHandlerCount
in classRpcExecutor
-
getActiveReadHandlerCount
- Overrides:
getActiveReadHandlerCount
in classRpcExecutor
-
getActiveScanHandlerCount
- Overrides:
getActiveScanHandlerCount
in 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:
onConfigurationChange
in classRpcExecutor
-
propagateBalancerConfigChange
private void propagateBalancerConfigChange(QueueBalancer balancer, org.apache.hadoop.conf.Configuration conf)
-