Remove system property es.enforce_max_shards_per_node (#36968)

The system property es.enforce_max_shards_per_node was not needed any more,
because we always enforce cluster-wide shard limit now.
This commit is contained in:
Ke Li 2019-01-03 05:01:12 +08:00 committed by Gordon Brown
parent 7a0047744d
commit 62ece69b92

View File

@ -159,20 +159,6 @@ public class IndicesService extends AbstractLifecycleComponent
public static final String INDICES_SHARDS_CLOSED_TIMEOUT = "indices.shards_closed_timeout";
public static final Setting<TimeValue> INDICES_CACHE_CLEAN_INTERVAL_SETTING =
Setting.positiveTimeSetting("indices.cache.cleanup_interval", TimeValue.timeValueMinutes(1), Property.NodeScope);
private static final boolean ENFORCE_MAX_SHARDS_PER_NODE;
static {
final String ENFORCE_SHARD_LIMIT_KEY = "es.enforce_max_shards_per_node";
final String enforceMaxShardsPerNode = System.getProperty(ENFORCE_SHARD_LIMIT_KEY);
if (enforceMaxShardsPerNode == null) {
ENFORCE_MAX_SHARDS_PER_NODE = false;
} else if ("true".equals(enforceMaxShardsPerNode)) {
ENFORCE_MAX_SHARDS_PER_NODE = true;
} else {
throw new IllegalArgumentException(ENFORCE_SHARD_LIMIT_KEY + " may only be unset or set to [true] but was [" +
enforceMaxShardsPerNode + "]");
}
}
/**
* The node's settings.