public class OverseerCollectionMessageHandler extends Object implements OverseerMessageHandler, Closeable
OverseerMessageHandler
that handles Collections API related
overseer messages.OverseerMessageHandler.Lock
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 |
PolicyHelper.SessionRef |
policySessionRef |
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 |
---|---|
void |
close() |
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) |
OverseerMessageHandler.Lock |
lockTask(ZkNodeProps message,
OverseerTaskProcessor.TaskBatch taskBatch)
Try to provide an exclusive lock for this particular task
return null if locking is not possible.
|
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) |
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 final PolicyHelper.SessionRef policySessionRef
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 OverseerMessageHandler.Lock lockTask(ZkNodeProps message, OverseerTaskProcessor.TaskBatch taskBatch)
OverseerMessageHandler
lockTask
in interface OverseerMessageHandler
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.