mirror of
https://github.com/apache/lucene.git
synced 2025-02-22 10:15:27 +00:00
add logging around shard assignment
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1411801 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ee55158d07
commit
105babd077
@ -221,14 +221,19 @@ public class Overseer {
|
||||
String nodeName = message.getStr(ZkStateReader.NODE_NAME_PROP);
|
||||
//get shardId from ClusterState
|
||||
sliceName = getAssignedId(state, nodeName, message);
|
||||
if (sliceName != null) {
|
||||
log.info("shard=" + sliceName + " is already registered");
|
||||
}
|
||||
}
|
||||
if(sliceName == null) {
|
||||
//request new shardId
|
||||
if (collectionExists) {
|
||||
// use existing numShards
|
||||
numShards = state.getCollectionStates().get(collection).size();
|
||||
log.info("Collection already exists with " + ZkStateReader.NUM_SHARDS_PROP + "=" + numShards);
|
||||
}
|
||||
sliceName = AssignShard.assignShard(collection, state, numShards);
|
||||
log.info("Assigning new node to shard shard=" + sliceName);
|
||||
}
|
||||
|
||||
Slice slice = state.getSlice(collection, sliceName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user