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 |
---|---|
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, take
public OverseerTaskQueue(SolrZkClient zookeeper, String dir)
public OverseerTaskQueue(SolrZkClient zookeeper, String dir, Stats stats)
public boolean containsTaskWithRequestId(String requestIdKey, String requestId) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void remove(OverseerTaskQueue.QueueEvent event) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public OverseerTaskQueue.QueueEvent offer(byte[] data, long timeout) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public List<OverseerTaskQueue.QueueEvent> peekTopN(int n, Predicate<String> excludeSet, long waitMillis) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public String getTailId() throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.