From 1df4efccd5bad6da9198dacbdd03cf0996c709c0 Mon Sep 17 00:00:00 2001
From: Nik Everett
- * Note: This method will only allow updates to dynamic settings. if a non-dynamic setting is updated an {@link IllegalArgumentException} is thrown instead.
- *
true
if the target has changed otherwise false
@@ -405,8 +408,10 @@ public abstract class AbstractScopedSettings extends AbstractComponent {
/**
* Updates a target settings builder with new, updated or deleted settings from a given settings builder.
+ *
* @param toApply the new settings to apply
- * @param target the target settings builder that the updates are applied to. All keys that have explicit null value in toApply will be removed from this builder
+ * @param target the target settings builder that the updates are applied to. All keys that have explicit null value in toApply will be
+ * removed from this builder
* @param updates a settings builder that holds all updates applied to target
* @param type a free text string to allow better exceptions messages
* @return true
if the target has changed otherwise false
@@ -417,11 +422,14 @@ public abstract class AbstractScopedSettings extends AbstractComponent {
/**
* Updates a target settings builder with new, updated or deleted settings from a given settings builder.
+ *
* @param toApply the new settings to apply
- * @param target the target settings builder that the updates are applied to. All keys that have explicit null value in toApply will be removed from this builder
+ * @param target the target settings builder that the updates are applied to. All keys that have explicit null value in toApply will be
+ * removed from this builder
* @param updates a settings builder that holds all updates applied to target
* @param type a free text string to allow better exceptions messages
- * @param onlyDynamic if false
all settings are updated otherwise only dynamic settings are updated. if set to true
and a non-dynamic setting is updated an exception is thrown.
+ * @param onlyDynamic if false
all settings are updated otherwise only dynamic settings are updated. if set to
+ * true
and a non-dynamic setting is updated an exception is thrown.
* @return true
if the target has changed otherwise false
*/
private boolean updateSettings(Settings toApply, Settings.Builder target, Settings.Builder updates, String type, boolean onlyDynamic) {
@@ -500,16 +508,22 @@ public abstract class AbstractScopedSettings extends AbstractComponent {
} else {
changed = true;
logger.warn("found unknown setting: {} value: {} - archiving", entry.getKey(), entry.getValue());
- // we put them back in here such that tools can check from the outside if there are any indices with broken settings. The setting can remain there
- // but we want users to be aware that some of their setting are broken and they can research why and what they need to do to replace them.
+ /*
+ * We put them back in here such that tools can check from the outside if there are any indices with broken
+ * settings. The setting can remain there but we want users to be aware that some of their setting are broken and
+ * they can research why and what they need to do to replace them.
+ */
builder.put(ARCHIVED_SETTINGS_PREFIX + entry.getKey(), entry.getValue());
}
}
} catch (IllegalArgumentException ex) {
changed = true;
logger.warn("found invalid setting: {} value: {} - archiving",ex , entry.getKey(), entry.getValue());
- // we put them back in here such that tools can check from the outside if there are any indices with broken settings. The setting can remain there
- // but we want users to be aware that some of their setting sare broken and they can research why and what they need to do to replace them.
+ /*
+ * We put them back in here such that tools can check from the outside if there are any indices with broken settings. The
+ * setting can remain there but we want users to be aware that some of their setting are broken and they can research why
+ * and what they need to do to replace them.
+ */
builder.put(ARCHIVED_SETTINGS_PREFIX + entry.getKey(), entry.getValue());
}
}
diff --git a/core/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java b/core/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java
index fabda1b62bb..1b795239457 100644
--- a/core/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java
+++ b/core/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java
@@ -58,7 +58,7 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
public static final Predicatetrue
iff this setting is a group setting. Group settings represent a set of settings
- * rather than a single value. The key, see {@link #getKey()}, in contrast to non-group settings is a prefix like cluster.store.
- * that matches all settings with this prefix.
+ * Returns true
iff this setting is a group setting. Group settings represent a set of settings rather than a single value.
+ * The key, see {@link #getKey()}, in contrast to non-group settings is a prefix like cluster.store. that matches all settings
+ * with this prefix.
*/
boolean isGroupSetting() {
return false;
@@ -356,7 +356,8 @@ public class Setting