public class OverseerTaskProcessor extends Object implements Runnable, Closeable
OverseerTaskProcessor.OverseerMessageHandlerSelector
determines which
OverseerMessageHandler
handles specific messages in the
queue.Modifier and Type | Class and Description |
---|---|
static interface |
OverseerTaskProcessor.OverseerMessageHandlerSelector
An interface to determine which
OverseerMessageHandler
handles a given message. |
protected class |
OverseerTaskProcessor.Runner |
Modifier and Type | Field and Description |
---|---|
static int |
MAX_PARALLEL_TASKS
Maximum number of overseer collection operations which can be
executed concurrently
|
ExecutorService |
tpe |
Constructor and Description |
---|
OverseerTaskProcessor(ZkStateReader zkStateReader,
String myId,
ShardHandlerFactory shardHandlerFactory,
String adminPath,
Overseer.Stats stats,
OverseerTaskProcessor.OverseerMessageHandlerSelector selector,
OverseerNodePrioritizer prioritizer,
OverseerTaskQueue workQueue,
DistributedMap runningMap,
DistributedMap completedMap,
DistributedMap failureMap) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.solr.cloud.Overseer.LeaderStatus |
amILeader() |
protected boolean |
checkExclusivity(OverseerMessageHandler messageHandler,
ZkNodeProps message,
String id) |
void |
close() |
static String |
getLeaderId(SolrZkClient zkClient) |
static String |
getLeaderNode(SolrZkClient zkClient) |
static List<String> |
getSortedElectionNodes(SolrZkClient zk,
String path) |
static List<String> |
getSortedOverseerNodeNames(SolrZkClient zk) |
boolean |
isClosed() |
void |
run() |
public static final int MAX_PARALLEL_TASKS
public ExecutorService tpe
public OverseerTaskProcessor(ZkStateReader zkStateReader, String myId, ShardHandlerFactory shardHandlerFactory, String adminPath, Overseer.Stats stats, OverseerTaskProcessor.OverseerMessageHandlerSelector selector, OverseerNodePrioritizer prioritizer, OverseerTaskQueue workQueue, DistributedMap runningMap, DistributedMap completedMap, DistributedMap failureMap)
protected boolean checkExclusivity(OverseerMessageHandler messageHandler, ZkNodeProps message, String id) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public static List<String> getSortedOverseerNodeNames(SolrZkClient zk) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static List<String> getSortedElectionNodes(SolrZkClient zk, String path) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static String getLeaderNode(SolrZkClient zkClient) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static String getLeaderId(SolrZkClient zkClient) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
protected org.apache.solr.cloud.Overseer.LeaderStatus amILeader()
public boolean isClosed()
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.