do not put num_shards in the cluster state

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1242828 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-02-10 15:56:19 +00:00
parent 76f0587508
commit 7728dcc5f2
1 changed files with 5 additions and 1 deletions

View File

@ -207,7 +207,11 @@ public class Overseer implements NodeStateChangeListener, ShardLeaderListener {
}
Map<String,String> props = new HashMap<String,String>();
for (Entry<String,String> entry : coreState.getProperties().entrySet()) {
Map<String,String> coreProps = new HashMap<String,String>(coreState.getProperties().size());
coreProps.putAll(coreState.getProperties());
// we don't put num_shards in the clusterstate
coreProps.remove("num_shards");
for (Entry<String,String> entry : coreProps.entrySet()) {
props.put(entry.getKey(), entry.getValue());
}
ZkNodeProps zkProps = new ZkNodeProps(props);