diff --git a/core/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java b/core/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java index 428eeee9fc8..8668a1c68f5 100644 --- a/core/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java +++ b/core/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java @@ -47,7 +47,7 @@ import static org.elasticsearch.common.transport.TransportAddressSerializers.add */ public class DiscoveryNode implements Writeable, ToXContent { - public static boolean localNode(Settings settings) { + public static boolean isLocalNode(Settings settings) { if (Node.NODE_LOCAL_SETTING.exists(settings)) { return Node.NODE_LOCAL_SETTING.get(settings); } diff --git a/core/src/main/java/org/elasticsearch/common/network/NetworkModule.java b/core/src/main/java/org/elasticsearch/common/network/NetworkModule.java index 4c32abe8156..7c7c16025b9 100644 --- a/core/src/main/java/org/elasticsearch/common/network/NetworkModule.java +++ b/core/src/main/java/org/elasticsearch/common/network/NetworkModule.java @@ -387,7 +387,7 @@ public class NetworkModule extends AbstractModule { bind(NamedWriteableRegistry.class).toInstance(namedWriteableRegistry); transportServiceTypes.bindType(binder(), settings, TRANSPORT_SERVICE_TYPE_KEY, NETTY_TRANSPORT); - String defaultTransport = DiscoveryNode.localNode(settings) ? LOCAL_TRANSPORT : NETTY_TRANSPORT; + String defaultTransport = DiscoveryNode.isLocalNode(settings) ? LOCAL_TRANSPORT : NETTY_TRANSPORT; transportTypes.bindType(binder(), settings, TRANSPORT_TYPE_KEY, defaultTransport); if (transportClient) { diff --git a/core/src/main/java/org/elasticsearch/discovery/DiscoveryModule.java b/core/src/main/java/org/elasticsearch/discovery/DiscoveryModule.java index 4076b880d6f..f70eb46e666 100644 --- a/core/src/main/java/org/elasticsearch/discovery/DiscoveryModule.java +++ b/core/src/main/java/org/elasticsearch/discovery/DiscoveryModule.java @@ -47,7 +47,7 @@ import java.util.function.Function; public class DiscoveryModule extends AbstractModule { public static final Setting DISCOVERY_TYPE_SETTING = - new Setting<>("discovery.type", settings -> DiscoveryNode.localNode(settings) ? "local" : "zen", Function.identity(), + new Setting<>("discovery.type", settings -> DiscoveryNode.isLocalNode(settings) ? "local" : "zen", Function.identity(), Property.NodeScope); public static final Setting ZEN_MASTER_SERVICE_TYPE_SETTING = new Setting<>("discovery.zen.masterservice.type", "zen", Function.identity(), Property.NodeScope); diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java index 73576c9a840..de7a5219445 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESSingleNodeTestCase.java @@ -23,7 +23,6 @@ import org.elasticsearch.Version; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder; import org.elasticsearch.action.admin.indices.get.GetIndexResponse; -import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder; import org.elasticsearch.cache.recycler.PageCacheRecycler; import org.elasticsearch.client.Client; import org.elasticsearch.client.Requests; @@ -191,7 +190,7 @@ public abstract class ESSingleNodeTestCase extends ESTestCase { .build(); Node build = new MockNode(settings, getVersion(), getPlugins()); build.start(); - assertThat(DiscoveryNode.localNode(build.settings()), is(true)); + assertThat(DiscoveryNode.isLocalNode(build.settings()), is(true)); return build; } diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java index f49d51237cf..dca508852a0 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java +++ b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java @@ -329,7 +329,7 @@ public final class InternalTestCluster extends TestCluster { if (Strings.hasLength(System.getProperty("es.node.local"))) { builder.put(Node.NODE_LOCAL_SETTING.getKey(), System.getProperty("es.node.local")); } - if (DiscoveryNode.localNode(builder.build())) { + if (DiscoveryNode.isLocalNode(builder.build())) { return "local"; } else { return "network";