|
|
@@ -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.
|