diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java index d01167ceeca..46a36f1d8a3 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequest.java @@ -35,7 +35,6 @@ public class NodesInfoRequest extends BaseNodesRequest { private boolean process = true; private boolean jvm = true; private boolean threadPool = true; - private boolean network = true; private boolean transport = true; private boolean http = true; private boolean plugins = true; @@ -60,7 +59,6 @@ public class NodesInfoRequest extends BaseNodesRequest { process = false; jvm = false; threadPool = false; - network = false; transport = false; http = false; plugins = false; @@ -76,7 +74,6 @@ public class NodesInfoRequest extends BaseNodesRequest { process = true; jvm = true; threadPool = true; - network = true; transport = true; http = true; plugins = true; @@ -158,21 +155,6 @@ public class NodesInfoRequest extends BaseNodesRequest { return this; } - /** - * Should the node Network be returned. - */ - public boolean network() { - return this.network; - } - - /** - * Should the node Network be returned. - */ - public NodesInfoRequest network(boolean network) { - this.network = network; - return this; - } - /** * Should the node Transport be returned. */ @@ -228,7 +210,6 @@ public class NodesInfoRequest extends BaseNodesRequest { process = in.readBoolean(); jvm = in.readBoolean(); threadPool = in.readBoolean(); - network = in.readBoolean(); transport = in.readBoolean(); http = in.readBoolean(); plugins = in.readBoolean(); @@ -242,7 +223,6 @@ public class NodesInfoRequest extends BaseNodesRequest { out.writeBoolean(process); out.writeBoolean(jvm); out.writeBoolean(threadPool); - out.writeBoolean(network); out.writeBoolean(transport); out.writeBoolean(http); out.writeBoolean(plugins); diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java index a1c5b405063..42d69794f08 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java @@ -87,14 +87,6 @@ public class NodesInfoRequestBuilder extends NodesOperationRequestBuilder { private boolean process; private boolean jvm; private boolean threadPool; - private boolean network; private boolean fs; private boolean transport; private boolean http; @@ -63,7 +62,6 @@ public class NodesStatsRequest extends BaseNodesRequest { this.process = true; this.jvm = true; this.threadPool = true; - this.network = true; this.fs = true; this.transport = true; this.http = true; @@ -81,7 +79,6 @@ public class NodesStatsRequest extends BaseNodesRequest { this.process = false; this.jvm = false; this.threadPool = false; - this.network = false; this.fs = false; this.transport = false; this.http = false; @@ -171,21 +168,6 @@ public class NodesStatsRequest extends BaseNodesRequest { return this; } - /** - * Should the node Network be returned. - */ - public boolean network() { - return this.network; - } - - /** - * Should the node Network be returned. - */ - public NodesStatsRequest network(boolean network) { - this.network = network; - return this; - } - /** * Should the node file system stats be returned. */ @@ -260,7 +242,6 @@ public class NodesStatsRequest extends BaseNodesRequest { process = in.readBoolean(); jvm = in.readBoolean(); threadPool = in.readBoolean(); - network = in.readBoolean(); fs = in.readBoolean(); transport = in.readBoolean(); http = in.readBoolean(); @@ -276,7 +257,6 @@ public class NodesStatsRequest extends BaseNodesRequest { out.writeBoolean(process); out.writeBoolean(jvm); out.writeBoolean(threadPool); - out.writeBoolean(network); out.writeBoolean(fs); out.writeBoolean(transport); out.writeBoolean(http); diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java index db8d774b39d..dfa8007f7cf 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java @@ -107,14 +107,6 @@ public class NodesStatsRequestBuilder extends NodesOperationRequestBuilder shardsStats = new ArrayList<>(); for (IndexService indexService : indicesService) { for (IndexShard indexShard : indexService) { diff --git a/core/src/main/java/org/elasticsearch/node/service/NodeService.java b/core/src/main/java/org/elasticsearch/node/service/NodeService.java index 5be6bf11e56..19647539b61 100644 --- a/core/src/main/java/org/elasticsearch/node/service/NodeService.java +++ b/core/src/main/java/org/elasticsearch/node/service/NodeService.java @@ -119,7 +119,7 @@ public class NodeService extends AbstractComponent { } public NodeInfo info(boolean settings, boolean os, boolean process, boolean jvm, boolean threadPool, - boolean network, boolean transport, boolean http, boolean plugin) { + boolean transport, boolean http, boolean plugin) { return new NodeInfo(version, Build.CURRENT, discovery.localNode(), serviceAttributes, settings ? this.settings : null, os ? monitorService.osService().info() : null, @@ -149,7 +149,7 @@ public class NodeService extends AbstractComponent { ); } - public NodeStats stats(CommonStatsFlags indices, boolean os, boolean process, boolean jvm, boolean threadPool, boolean network, + public NodeStats stats(CommonStatsFlags indices, boolean os, boolean process, boolean jvm, boolean threadPool, boolean fs, boolean transport, boolean http, boolean circuitBreaker, boolean script) { // for indices stats we want to include previous allocated shards stats as well (it will diff --git a/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/info/RestNodesInfoAction.java b/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/info/RestNodesInfoAction.java index a78c90aca63..06c5a224a81 100644 --- a/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/info/RestNodesInfoAction.java +++ b/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/info/RestNodesInfoAction.java @@ -42,7 +42,7 @@ import static org.elasticsearch.rest.RestRequest.Method.GET; public class RestNodesInfoAction extends BaseRestHandler { private final SettingsFilter settingsFilter; - private final static Set ALLOWED_METRICS = Sets.newHashSet("http", "jvm", "network", "os", "plugins", "process", "settings", "thread_pool", "transport"); + private final static Set ALLOWED_METRICS = Sets.newHashSet("http", "jvm", "os", "plugins", "process", "settings", "thread_pool", "transport"); @Inject public RestNodesInfoAction(Settings settings, RestController controller, Client client, SettingsFilter settingsFilter) { @@ -91,7 +91,6 @@ public class RestNodesInfoAction extends BaseRestHandler { nodesInfoRequest.process(metrics.contains("process")); nodesInfoRequest.jvm(metrics.contains("jvm")); nodesInfoRequest.threadPool(metrics.contains("thread_pool")); - nodesInfoRequest.network(metrics.contains("network")); nodesInfoRequest.transport(metrics.contains("transport")); nodesInfoRequest.http(metrics.contains("http")); nodesInfoRequest.plugins(metrics.contains("plugins")); diff --git a/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/stats/RestNodesStatsAction.java b/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/stats/RestNodesStatsAction.java index 3c231de534e..fa146b57f06 100644 --- a/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/stats/RestNodesStatsAction.java +++ b/core/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/stats/RestNodesStatsAction.java @@ -69,7 +69,6 @@ public class RestNodesStatsAction extends BaseRestHandler { nodesStatsRequest.os(metrics.contains("os")); nodesStatsRequest.jvm(metrics.contains("jvm")); nodesStatsRequest.threadPool(metrics.contains("thread_pool")); - nodesStatsRequest.network(metrics.contains("network")); nodesStatsRequest.fs(metrics.contains("fs")); nodesStatsRequest.transport(metrics.contains("transport")); nodesStatsRequest.http(metrics.contains("http")); diff --git a/core/src/test/java/org/elasticsearch/stresstest/leaks/GenericStatsLeak.java b/core/src/test/java/org/elasticsearch/stresstest/leaks/GenericStatsLeak.java index 03d0ca76d04..fc0d5bc5253 100644 --- a/core/src/test/java/org/elasticsearch/stresstest/leaks/GenericStatsLeak.java +++ b/core/src/test/java/org/elasticsearch/stresstest/leaks/GenericStatsLeak.java @@ -32,7 +32,6 @@ public class GenericStatsLeak { Node node = NodeBuilder.nodeBuilder().settings(Settings.settingsBuilder() .put("monitor.os.refresh_interval", 0) .put("monitor.process.refresh_interval", 0) - .put("monitor.network.refresh_interval", 0) ).node(); JvmService jvmService = node.injector().getInstance(JvmService.class); diff --git a/core/src/test/java/org/elasticsearch/test/InternalTestCluster.java b/core/src/test/java/org/elasticsearch/test/InternalTestCluster.java index 2a17f9eb06d..8ec6f89e44b 100644 --- a/core/src/test/java/org/elasticsearch/test/InternalTestCluster.java +++ b/core/src/test/java/org/elasticsearch/test/InternalTestCluster.java @@ -94,7 +94,6 @@ import org.elasticsearch.node.NodeMocksPlugin; import org.elasticsearch.node.internal.InternalSettingsPreparer; import org.elasticsearch.node.service.NodeService; import org.elasticsearch.script.ScriptService; -import org.elasticsearch.search.SearchModule; import org.elasticsearch.search.SearchService; import org.elasticsearch.test.disruption.ServiceDisruptionScheme; import org.elasticsearch.search.MockSearchService; @@ -1865,7 +1864,7 @@ public final class InternalTestCluster extends TestCluster { } NodeService nodeService = getInstanceFromNode(NodeService.class, nodeAndClient.node); - NodeStats stats = nodeService.stats(CommonStatsFlags.ALL, false, false, false, false, false, false, false, false, false, false); + NodeStats stats = nodeService.stats(CommonStatsFlags.ALL, false, false, false, false, false, false, false, false, false); assertThat("Fielddata size must be 0 on node: " + stats.getNode(), stats.getIndices().getFieldData().getMemorySizeInBytes(), equalTo(0l)); assertThat("Query cache size must be 0 on node: " + stats.getNode(), stats.getIndices().getQueryCache().getMemorySizeInBytes(), equalTo(0l)); assertThat("FixedBitSet cache size must be 0 on node: " + stats.getNode(), stats.getIndices().getSegments().getBitsetMemoryInBytes(), equalTo(0l));