fix compile after change to Client settings in core
Original commit: elastic/x-pack-elasticsearch@ab069484a6
This commit is contained in:
parent
d587ace5f1
commit
dcf9074c4f
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue