public class OverseerTaskQueue extends ZkDistributedQueue
ZkDistributedQueue augmented with helper methods specific to the overseer task queues.
Methods specific to this subclass ignore superclass internal state and hit ZK directly.
This is inefficient! But the API on this class is kind of muddy..| Modifier and Type | Class and Description |
|---|---|
static class |
OverseerTaskQueue.QueueEvent |
| Constructor and Description |
|---|
OverseerTaskQueue(SolrZkClient zookeeper,
String dir) |
OverseerTaskQueue(SolrZkClient zookeeper,
String dir,
Stats stats) |
| Modifier and Type | Method and Description |
|---|---|
void |
allowOverseerPendingTasksToComplete() |
boolean |
containsTaskWithRequestId(String requestIdKey,
String requestId)
Returns true if the queue contains a task with the specified async id.
|
String |
getTailId()
Gets last element of the Queue without removing it.
|
OverseerTaskQueue.QueueEvent |
offer(byte[] data,
long timeout)
Offer the data and wait for the response
|
List<OverseerTaskQueue.QueueEvent> |
peekTopN(int n,
Predicate<String> excludeSet,
long waitMillis) |
void |
remove(OverseerTaskQueue.QueueEvent event)
Remove the event and save the response into the other path.
|
getStats, getZkStats, offer, peek, peek, peek, peekElements, poll, remove, remove, takepublic OverseerTaskQueue(SolrZkClient zookeeper, String dir)
public OverseerTaskQueue(SolrZkClient zookeeper, String dir, Stats stats)
public void allowOverseerPendingTasksToComplete()
public boolean containsTaskWithRequestId(String requestIdKey, String requestId) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void remove(OverseerTaskQueue.QueueEvent event) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic OverseerTaskQueue.QueueEvent offer(byte[] data, long timeout) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic List<OverseerTaskQueue.QueueEvent> peekTopN(int n, Predicate<String> excludeSet, long waitMillis) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic String getTailId() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.