diff --git a/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/LicensePlugin.java b/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/LicensePlugin.java index 1525e27e686..2ac1b4f2d90 100644 --- a/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/LicensePlugin.java +++ b/elasticsearch/x-pack/license-plugin/src/main/java/org/elasticsearch/license/plugin/LicensePlugin.java @@ -45,11 +45,11 @@ public class LicensePlugin extends Plugin { public LicensePlugin(Settings settings) { if (DiscoveryNode.clientNode(settings)) { // Enable plugin only on node clients - this.isEnabled = "node".equals(settings.get(Client.CLIENT_TYPE_SETTING)); + this.isEnabled = "node".equals(settings.get(Client.CLIENT_TYPE_SETTING_S.getKey())); } else { this.isEnabled = true; } - transportClient = "transport".equals(settings.get(Client.CLIENT_TYPE_SETTING)); + transportClient = "transport".equals(settings.get(Client.CLIENT_TYPE_SETTING_S.getKey())); } @Override diff --git a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/consumer/TestConsumerPluginBase.java b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/consumer/TestConsumerPluginBase.java index b2106920e02..400e46c136e 100644 --- a/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/consumer/TestConsumerPluginBase.java +++ b/elasticsearch/x-pack/license-plugin/src/test/java/org/elasticsearch/license/plugin/consumer/TestConsumerPluginBase.java @@ -21,7 +21,7 @@ public abstract class TestConsumerPluginBase extends Plugin { public TestConsumerPluginBase(Settings settings) { if (DiscoveryNode.clientNode(settings)) { // Enable plugin only on node clients - this.isEnabled = "node".equals(settings.get(Client.CLIENT_TYPE_SETTING)); + this.isEnabled = "node".equals(settings.get(Client.CLIENT_TYPE_SETTING_S.getKey())); } else { this.isEnabled = true; } diff --git a/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/MarvelPlugin.java b/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/MarvelPlugin.java index c65660ac26b..168c7e0d445 100644 --- a/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/MarvelPlugin.java +++ b/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/MarvelPlugin.java @@ -101,7 +101,7 @@ public class MarvelPlugin extends Plugin { } public static boolean marvelEnabled(Settings settings) { - if (!"node".equals(settings.get(Client.CLIENT_TYPE_SETTING))) { + if (!"node".equals(settings.get(Client.CLIENT_TYPE_SETTING_S.getKey()))) { logger.trace("marvel cannot be started on a transport client"); return false; } diff --git a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/MarvelPluginClientTests.java b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/MarvelPluginClientTests.java index 6a63ab08e39..d3d69ff29cd 100644 --- a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/MarvelPluginClientTests.java +++ b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/MarvelPluginClientTests.java @@ -18,7 +18,7 @@ import static org.hamcrest.Matchers.is; public class MarvelPluginClientTests extends ESTestCase { public void testModulesWithClientSettings() { Settings settings = Settings.builder() - .put(Client.CLIENT_TYPE_SETTING, TransportClient.CLIENT_TYPE) + .put(Client.CLIENT_TYPE_SETTING_S.getKey(), TransportClient.CLIENT_TYPE) .build(); MarvelPlugin plugin = new MarvelPlugin(settings); @@ -30,7 +30,7 @@ public class MarvelPluginClientTests extends ESTestCase { public void testModulesWithNodeSettings() { // these settings mimic what ES does when running as a node... Settings settings = Settings.builder() - .put(Client.CLIENT_TYPE_SETTING, "node") + .put(Client.CLIENT_TYPE_SETTING_S.getKey(), "node") .build(); MarvelPlugin plugin = new MarvelPlugin(settings); assertThat(plugin.isEnabled(), is(true)); diff --git a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/ShieldPlugin.java b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/ShieldPlugin.java index 2eff395ee6c..848b0a01c41 100644 --- a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/ShieldPlugin.java +++ b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/ShieldPlugin.java @@ -349,7 +349,7 @@ public class ShieldPlugin extends Plugin { } public static boolean clientMode(Settings settings) { - return !"node".equals(settings.get(Client.CLIENT_TYPE_SETTING)); + return !"node".equals(settings.get(Client.CLIENT_TYPE_SETTING_S.getKey())); } public static boolean shieldEnabled(Settings settings) { diff --git a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/support/AbstractShieldModule.java b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/support/AbstractShieldModule.java index 865accf0b12..8727d45293e 100644 --- a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/support/AbstractShieldModule.java +++ b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/support/AbstractShieldModule.java @@ -21,7 +21,7 @@ public abstract class AbstractShieldModule extends AbstractModule { public AbstractShieldModule(Settings settings) { this.settings = settings; - this.clientMode = !"node".equals(settings.get(Client.CLIENT_TYPE_SETTING)); + this.clientMode = !"node".equals(settings.get(Client.CLIENT_TYPE_SETTING_S.getKey())); this.shieldEnabled = ShieldPlugin.shieldEnabled(settings); } diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/WatcherPlugin.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/WatcherPlugin.java index fc5f329a375..60a9bdf5eb5 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/WatcherPlugin.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/WatcherPlugin.java @@ -113,7 +113,7 @@ public class WatcherPlugin extends Plugin { public WatcherPlugin(Settings settings) { this.settings = settings; - transportClient = "transport".equals(settings.get(Client.CLIENT_TYPE_SETTING)); + transportClient = "transport".equals(settings.get(Client.CLIENT_TYPE_SETTING_S.getKey())); enabled = watcherEnabled(settings); validAutoCreateIndex(settings); }