org.apache.hadoop.hbase.ipc
Class BalancedQueueRpcExecutor

java.lang.Object
  extended by org.apache.hadoop.hbase.ipc.RpcExecutor
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.ipc.RpcExecutor
RpcExecutor.QueueBalancer
 
Field Summary
protected  List<BlockingQueue<CallRunner>> queues
           
 
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)
           
 
Method Summary
 void dispatch(CallRunner callTask)
          Add the request to the executor queue
 int getQueueLength()
          Returns the length of the pending queue
 List<BlockingQueue<CallRunner>> getQueues()
          Returns the list of request queues
protected  void initializeQueues(int numQueues, Class<? extends BlockingQueue> queueClass, Object... initargs)
           
 
Methods inherited from class org.apache.hadoop.hbase.ipc.RpcExecutor
consumerLoop, getActiveHandlerCount, getBalancer, start, startHandlers, startHandlers, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queues

protected final List<BlockingQueue<CallRunner>> queues
Constructor Detail

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)
Method Detail

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.