Package org.apache.hadoop.hbase.ipc
Class RandomQueueBalancer
java.lang.Object
org.apache.hadoop.hbase.ipc.RandomQueueBalancer
- All Implemented Interfaces:
QueueBalancer
Queue balancer that just randomly selects a queue in the range [0, num queues).
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRandomQueueBalancer
(org.apache.hadoop.conf.Configuration conf, String executorName, List<BlockingQueue<CallRunner>> queues) -
Method Summary
Modifier and TypeMethodDescriptionint
getNextQueue
(CallRunner callRunner) Returns the index of the next queue to which a request should be inserted(package private) List<BlockingQueue<CallRunner>>
Exposed for use in tests
-
Field Details
-
queueSize
-
queues
-
-
Constructor Details
-
RandomQueueBalancer
public RandomQueueBalancer(org.apache.hadoop.conf.Configuration conf, String executorName, List<BlockingQueue<CallRunner>> queues)
-
-
Method Details
-
getNextQueue
Description copied from interface:QueueBalancer
Returns the index of the next queue to which a request should be inserted- Specified by:
getNextQueue
in interfaceQueueBalancer
-
getQueues
Exposed for use in tests
-