From 08a2006d95b969b0c6b33a19f171f8c6be688b2b Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Mon, 15 Oct 2018 16:05:14 -0400 Subject: [PATCH] Core: Remove two methods from AbstractComponent (#34336) This removes another two methods from `AbstractComponent`. One isn't used at all and another is only used in a single class in watcher. I've moved the method that watcher uses into the single class that uses it. --- .../common/component/AbstractComponent.java | 20 ------------------- .../watcher/ResourceWatcherService.java | 6 ------ 2 files changed, 26 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/common/component/AbstractComponent.java b/server/src/main/java/org/elasticsearch/common/component/AbstractComponent.java index 167ffdb7bea25..97a8053c1d912 100644 --- a/server/src/main/java/org/elasticsearch/common/component/AbstractComponent.java +++ b/server/src/main/java/org/elasticsearch/common/component/AbstractComponent.java @@ -21,7 +21,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.elasticsearch.common.Strings; import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.node.Node; @@ -44,23 +43,4 @@ public AbstractComponent(Settings settings) { public final String nodeName() { return Node.NODE_NAME_SETTING.get(settings); } - - /** - * Checks for a deprecated setting and logs the correct alternative - */ - protected void logDeprecatedSetting(String settingName, String alternativeName) { - if (!Strings.isNullOrEmpty(settings.get(settingName))) { - deprecationLogger.deprecated("Setting [{}] is deprecated, use [{}] instead", settingName, alternativeName); - } - } - - /** - * Checks for a removed setting and logs the correct alternative - */ - protected void logRemovedSetting(String settingName, String alternativeName) { - if (!Strings.isNullOrEmpty(settings.get(settingName))) { - deprecationLogger.deprecated("Setting [{}] has been removed, use [{}] instead", settingName, alternativeName); - } - } - } diff --git a/server/src/main/java/org/elasticsearch/watcher/ResourceWatcherService.java b/server/src/main/java/org/elasticsearch/watcher/ResourceWatcherService.java index 54b24a86cc385..997f7e845e287 100644 --- a/server/src/main/java/org/elasticsearch/watcher/ResourceWatcherService.java +++ b/server/src/main/java/org/elasticsearch/watcher/ResourceWatcherService.java @@ -97,12 +97,6 @@ public ResourceWatcherService(Settings settings, ThreadPool threadPool) { mediumMonitor = new ResourceMonitor(interval, Frequency.MEDIUM); interval = RELOAD_INTERVAL_HIGH.get(settings); highMonitor = new ResourceMonitor(interval, Frequency.HIGH); - - logRemovedSetting("watcher.enabled", "resource.reload.enabled"); - logRemovedSetting("watcher.interval", "resource.reload.interval"); - logRemovedSetting("watcher.interval.low", "resource.reload.interval.low"); - logRemovedSetting("watcher.interval.medium", "resource.reload.interval.medium"); - logRemovedSetting("watcher.interval.high", "resource.reload.interval.high"); } @Override