@InterfaceAudience.Private @InterfaceStability.Stable public class RandomQueueBalancer extends Object implements QueueBalancer
Modifier and Type | Field and Description |
---|---|
private List<BlockingQueue<CallRunner>> |
queues |
private int |
queueSize |
Constructor and Description |
---|
RandomQueueBalancer(org.apache.hadoop.conf.Configuration conf,
String executorName,
List<BlockingQueue<CallRunner>> queues) |
Modifier and Type | Method and Description |
---|---|
int |
getNextQueue(CallRunner callRunner)
Returns the index of the next queue to which a request should be inserted
|
(package private) List<BlockingQueue<CallRunner>> |
getQueues()
Exposed for use in tests
|
private final int queueSize
private final List<BlockingQueue<CallRunner>> queues
public RandomQueueBalancer(org.apache.hadoop.conf.Configuration conf, String executorName, List<BlockingQueue<CallRunner>> queues)
public int getNextQueue(CallRunner callRunner)
QueueBalancer
getNextQueue
in interface QueueBalancer
List<BlockingQueue<CallRunner>> getQueues()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.