public class OverseerCollectionMessageHandler extends Object implements OverseerMessageHandler
OverseerMessageHandler
that handles Collections API related
overseer messages.OverseerMessageHandler.ExclusiveMarking
Modifier and Type | Field and Description |
---|---|
static String |
COLL_CONF |
static String |
COLL_PROP_PREFIX |
static Map<String,Object> |
COLL_PROPS |
static String |
CREATE_NODE_SET |
static String |
CREATE_NODE_SET_EMPTY |
static String |
CREATE_NODE_SET_SHUFFLE |
static String |
NUM_SLICES |
static String |
ONLY_ACTIVE_NODES |
static String |
ONLY_IF_DOWN |
static String |
REQUESTID |
static String |
ROUTER |
static String |
SHARD_UNIQUE |
static String |
SHARDS_PROP |
Constructor and Description |
---|
OverseerCollectionMessageHandler(ZkStateReader zkStateReader,
String myId,
ShardHandlerFactory shardHandlerFactory,
String adminPath,
Overseer.Stats stats,
Overseer overseer,
OverseerNodePrioritizer overseerPrioritizer) |
Modifier and Type | Method and Description |
---|---|
OverseerMessageHandler.ExclusiveMarking |
checkExclusiveMarking(String collectionName,
ZkNodeProps message) |
protected void |
crossCheckReplicaStateWithLiveNodes(List<String> liveNodes,
NamedList<Object> collectionProps)
Walks the tree of collection status to verify that any replicas not reporting a "down" status is
on a live node, if any replicas reporting their status as "active" but the node is not live is
marked as "down"; used by CLUSTERSTATUS.
|
String |
getName() |
String |
getTaskKey(ZkNodeProps message) |
String |
getTimerName(String operation) |
void |
markExclusiveTask(String collectionName,
ZkNodeProps message) |
SolrResponse |
processMessage(ZkNodeProps message,
String operation) |
static void |
sendShardRequest(String nodeName,
ModifiableSolrParams params,
ShardHandler shardHandler,
String asyncId,
Map<String,String> requestMap,
String adminPath,
ZkStateReader zkStateReader) |
void |
unmarkExclusiveTask(String collectionName,
String operation,
ZkNodeProps message) |
public static final String NUM_SLICES
public static final String CREATE_NODE_SET_SHUFFLE
public static final String CREATE_NODE_SET_EMPTY
public static final String CREATE_NODE_SET
public static final String ROUTER
public static final String SHARDS_PROP
public static final String REQUESTID
public static final String COLL_CONF
public static final String COLL_PROP_PREFIX
public static final String ONLY_IF_DOWN
public static final String SHARD_UNIQUE
public static final String ONLY_ACTIVE_NODES
public OverseerCollectionMessageHandler(ZkStateReader zkStateReader, String myId, ShardHandlerFactory shardHandlerFactory, String adminPath, Overseer.Stats stats, Overseer overseer, OverseerNodePrioritizer overseerPrioritizer)
public SolrResponse processMessage(ZkNodeProps message, String operation)
processMessage
in interface OverseerMessageHandler
message
- the message to processoperation
- the operation to processprotected void crossCheckReplicaStateWithLiveNodes(List<String> liveNodes, NamedList<Object> collectionProps)
liveNodes
- List of currently live node names.collectionProps
- Map of collection status information pulled directly from ZooKeeper.public static void sendShardRequest(String nodeName, ModifiableSolrParams params, ShardHandler shardHandler, String asyncId, Map<String,String> requestMap, String adminPath, ZkStateReader zkStateReader)
public String getName()
getName
in interface OverseerMessageHandler
public String getTimerName(String operation)
getTimerName
in interface OverseerMessageHandler
operation
- the operation to be timedpublic String getTaskKey(ZkNodeProps message)
getTaskKey
in interface OverseerMessageHandler
message
- the message being processedpublic void markExclusiveTask(String collectionName, ZkNodeProps message)
markExclusiveTask
in interface OverseerMessageHandler
collectionName
- the key associated with the task, cached from getTaskKeymessage
- the message being processedpublic void unmarkExclusiveTask(String collectionName, String operation, ZkNodeProps message)
unmarkExclusiveTask
in interface OverseerMessageHandler
collectionName
- the key associated with the taskoperation
- the operation being processedmessage
- the message being processedpublic OverseerMessageHandler.ExclusiveMarking checkExclusiveMarking(String collectionName, ZkNodeProps message)
checkExclusiveMarking
in interface OverseerMessageHandler
collectionName
- the key associated with the taskmessage
- the message being processedCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.