@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"}) @InterfaceStability.Evolving public class RWQueueRpcExecutor extends RpcExecutor
Modifier and Type | Field and Description |
---|---|
private AtomicInteger |
activeReadHandlerCount |
private AtomicInteger |
activeScanHandlerCount |
private AtomicInteger |
activeWriteHandlerCount |
static String |
CALL_QUEUE_READ_SHARE_CONF_KEY |
static String |
CALL_QUEUE_SCAN_SHARE_CONF_KEY |
private static org.slf4j.Logger |
LOG |
private int |
numReadQueues |
private int |
numScanQueues |
private int |
numWriteQueues |
private QueueBalancer |
readBalancer |
private int |
readHandlersCount |
private QueueBalancer |
scanBalancer |
private int |
scanHandlersCount |
private QueueBalancer |
writeBalancer |
private int |
writeHandlersCount |
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 and Description |
---|
RWQueueRpcExecutor(String name,
int handlerCount,
int maxQueueLength,
PriorityFunction priority,
org.apache.hadoop.conf.Configuration conf,
Abortable abortable) |
Modifier and Type | Method and Description |
---|---|
private 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 queue
|
protected boolean |
dispatchTo(boolean toWriteQueue,
boolean toScanQueue,
CallRunner callTask) |
int |
getActiveHandlerCount() |
int |
getActiveReadHandlerCount() |
int |
getActiveScanHandlerCount() |
int |
getActiveWriteHandlerCount() |
(package private) QueueBalancer |
getReadBalancer() |
int |
getReadQueueLength() |
protected float |
getReadShare(org.apache.hadoop.conf.Configuration conf) |
(package private) QueueBalancer |
getScanBalancer() |
int |
getScanQueueLength() |
protected float |
getScanShare(org.apache.hadoop.conf.Configuration conf) |
(package private) QueueBalancer |
getWriteBalancer() |
int |
getWriteQueueLength() |
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 |
shouldDispatchToScanQueue(CallRunner task) |
protected void |
startHandlers(int port) |
getBalancer, getCallQueueCountsSummary, getCallQueueSizeSummary, getHandler, getName, getNumGeneralCallsDropped, getNumLifoModeSwitches, getQueueLength, getQueues, initializeQueues, isCodelQueueType, isDeadlineQueueType, isFifoQueueType, isPluggableQueueType, isPluggableQueueWithFastPath, resizeQueues, start, startHandlers, stop
private static final org.slf4j.Logger LOG
public static final String CALL_QUEUE_READ_SHARE_CONF_KEY
public static final String CALL_QUEUE_SCAN_SHARE_CONF_KEY
private final QueueBalancer writeBalancer
private final QueueBalancer readBalancer
private final QueueBalancer scanBalancer
private final int writeHandlersCount
private final int readHandlersCount
private final int scanHandlersCount
private final int numWriteQueues
private final int numReadQueues
private final int numScanQueues
private final AtomicInteger activeWriteHandlerCount
private final AtomicInteger activeReadHandlerCount
private final AtomicInteger activeScanHandlerCount
public RWQueueRpcExecutor(String name, int handlerCount, int maxQueueLength, PriorityFunction priority, org.apache.hadoop.conf.Configuration conf, Abortable abortable)
protected int computeNumCallQueues(int handlerCount, float callQueuesHandlersFactor)
computeNumCallQueues
in class RpcExecutor
protected void startHandlers(int port)
startHandlers
in class RpcExecutor
public boolean dispatch(CallRunner callTask)
RpcExecutor
dispatch
in class RpcExecutor
protected boolean dispatchTo(boolean toWriteQueue, boolean toScanQueue, CallRunner callTask)
public int getWriteQueueLength()
getWriteQueueLength
in class RpcExecutor
public int getReadQueueLength()
getReadQueueLength
in class RpcExecutor
public int getScanQueueLength()
getScanQueueLength
in class RpcExecutor
public int getActiveHandlerCount()
getActiveHandlerCount
in class RpcExecutor
public int getActiveWriteHandlerCount()
getActiveWriteHandlerCount
in class RpcExecutor
public int getActiveReadHandlerCount()
getActiveReadHandlerCount
in class RpcExecutor
public int getActiveScanHandlerCount()
getActiveScanHandlerCount
in class RpcExecutor
protected boolean isWriteRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param)
QueueBalancer getWriteBalancer()
QueueBalancer getReadBalancer()
QueueBalancer getScanBalancer()
private boolean isScanRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader header, org.apache.hbase.thirdparty.com.google.protobuf.Message param)
protected boolean shouldDispatchToScanQueue(CallRunner task)
protected float getReadShare(org.apache.hadoop.conf.Configuration conf)
protected float getScanShare(org.apache.hadoop.conf.Configuration conf)
private static int calcNumWriters(int count, float readShare)
private static int calcNumReaders(int count, float readShare)
public void onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
onConfigurationChange
in class RpcExecutor
private void propagateBalancerConfigChange(QueueBalancer balancer, org.apache.hadoop.conf.Configuration conf)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.