org.apache.hadoop.hbase.ipc
Class BalancedQueueRpcExecutor
java.lang.Object
org.apache.hadoop.hbase.ipc.RpcExecutor
org.apache.hadoop.hbase.ipc.BalancedQueueRpcExecutor
@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"})
@InterfaceStability.Evolving
public class BalancedQueueRpcExecutor- extends RpcExecutor
An RpcExecutor that will balance requests evenly across all its queues, but still remains
efficient with a single queue via an inlinable queue balancing mechanism.
|
Constructor Summary |
BalancedQueueRpcExecutor(String name,
int handlerCount,
int numQueues,
org.apache.hadoop.conf.Configuration conf,
Abortable abortable,
Class<? extends BlockingQueue> queueClass,
Object... initargs)
|
BalancedQueueRpcExecutor(String name,
int handlerCount,
int numQueues,
int maxQueueLength)
|
BalancedQueueRpcExecutor(String name,
int handlerCount,
int numQueues,
int maxQueueLength,
org.apache.hadoop.conf.Configuration conf,
Abortable abortable)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
queues
protected final List<BlockingQueue<CallRunner>> queues
BalancedQueueRpcExecutor
public BalancedQueueRpcExecutor(String name,
int handlerCount,
int numQueues,
int maxQueueLength)
BalancedQueueRpcExecutor
public BalancedQueueRpcExecutor(String name,
int handlerCount,
int numQueues,
int maxQueueLength,
org.apache.hadoop.conf.Configuration conf,
Abortable abortable)
BalancedQueueRpcExecutor
public BalancedQueueRpcExecutor(String name,
int handlerCount,
int numQueues,
org.apache.hadoop.conf.Configuration conf,
Abortable abortable,
Class<? extends BlockingQueue> queueClass,
Object... initargs)
initializeQueues
protected void initializeQueues(int numQueues,
Class<? extends BlockingQueue> queueClass,
Object... initargs)
dispatch
public void dispatch(CallRunner callTask)
throws InterruptedException
- Description copied from class:
RpcExecutor
- Add the request to the executor queue
- Specified by:
dispatch in class RpcExecutor
- Throws:
InterruptedException
getQueueLength
public int getQueueLength()
- Description copied from class:
RpcExecutor
- Returns the length of the pending queue
- Specified by:
getQueueLength in class RpcExecutor
getQueues
public List<BlockingQueue<CallRunner>> getQueues()
- Description copied from class:
RpcExecutor
- Returns the list of request queues
- Specified by:
getQueues in class RpcExecutor
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.