HBASE-20499 Replication/Priority executors can use specific max queue length as default value instead of general maxQueueLength
Signed-off-by: tedyu <yuzhihong@gmail.com>
(cherry picked from commit 6d080762ef
)
This commit is contained in:
parent
642e933cda
commit
eb73492eac
|
@ -438,8 +438,12 @@ public abstract class RpcExecutor {
|
|||
*/
|
||||
public void resizeQueues(Configuration conf) {
|
||||
String configKey = RpcScheduler.IPC_SERVER_MAX_CALLQUEUE_LENGTH;
|
||||
if (name != null && name.toLowerCase(Locale.ROOT).contains("priority")) {
|
||||
if (name != null) {
|
||||
if (name.toLowerCase(Locale.ROOT).contains("priority")) {
|
||||
configKey = RpcScheduler.IPC_SERVER_PRIORITY_MAX_CALLQUEUE_LENGTH;
|
||||
} else if (name.toLowerCase(Locale.ROOT).contains("replication")) {
|
||||
configKey = RpcScheduler.IPC_SERVER_REPLICATION_MAX_CALLQUEUE_LENGTH;
|
||||
}
|
||||
}
|
||||
final int queueLimit = currentQueueLimit;
|
||||
currentQueueLimit = conf.getInt(configKey, queueLimit);
|
||||
|
|
|
@ -71,6 +71,9 @@ public class SimpleRpcScheduler extends RpcScheduler implements ConfigurationObs
|
|||
handlerCount * RpcServer.DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER);
|
||||
int maxPriorityQueueLength = conf.getInt(RpcScheduler.IPC_SERVER_PRIORITY_MAX_CALLQUEUE_LENGTH,
|
||||
priorityHandlerCount * RpcServer.DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER);
|
||||
int maxReplicationQueueLength =
|
||||
conf.getInt(RpcScheduler.IPC_SERVER_REPLICATION_MAX_CALLQUEUE_LENGTH,
|
||||
replicationHandlerCount * RpcServer.DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER);
|
||||
int maxBulkLoadQueueLength = conf.getInt(RpcScheduler.IPC_SERVER_BULKLOAD_MAX_CALLQUEUE_LENGTH,
|
||||
bulkLoadHandlerCount * RpcServer.DEFAULT_MAX_CALLQUEUE_LENGTH_PER_HANDLER);
|
||||
|
||||
|
@ -116,7 +119,8 @@ public class SimpleRpcScheduler extends RpcScheduler implements ConfigurationObs
|
|||
}
|
||||
this.replicationExecutor = replicationHandlerCount > 0
|
||||
? new FastPathBalancedQueueRpcExecutor("replication.FPBQ", replicationHandlerCount,
|
||||
RpcExecutor.CALL_QUEUE_TYPE_FIFO_CONF_VALUE, maxQueueLength, priority, conf, abortable)
|
||||
RpcExecutor.CALL_QUEUE_TYPE_FIFO_CONF_VALUE, maxReplicationQueueLength, priority, conf,
|
||||
abortable)
|
||||
: null;
|
||||
|
||||
this.metaTransitionExecutor = metaTransitionHandler > 0
|
||||
|
|
Loading…
Reference in New Issue