There is no longer a network section in the nodes info and stats
requests. Remove _node/network and _node/stats/network closes #12889
This commit is contained in:
parent
532806af1a
commit
7624ae4f96
|
@ -35,7 +35,6 @@ public class NodesInfoRequest extends BaseNodesRequest<NodesInfoRequest> {
|
||||||
private boolean process = true;
|
private boolean process = true;
|
||||||
private boolean jvm = true;
|
private boolean jvm = true;
|
||||||
private boolean threadPool = true;
|
private boolean threadPool = true;
|
||||||
private boolean network = true;
|
|
||||||
private boolean transport = true;
|
private boolean transport = true;
|
||||||
private boolean http = true;
|
private boolean http = true;
|
||||||
private boolean plugins = true;
|
private boolean plugins = true;
|
||||||
|
@ -60,7 +59,6 @@ public class NodesInfoRequest extends BaseNodesRequest<NodesInfoRequest> {
|
||||||
process = false;
|
process = false;
|
||||||
jvm = false;
|
jvm = false;
|
||||||
threadPool = false;
|
threadPool = false;
|
||||||
network = false;
|
|
||||||
transport = false;
|
transport = false;
|
||||||
http = false;
|
http = false;
|
||||||
plugins = false;
|
plugins = false;
|
||||||
|
@ -76,7 +74,6 @@ public class NodesInfoRequest extends BaseNodesRequest<NodesInfoRequest> {
|
||||||
process = true;
|
process = true;
|
||||||
jvm = true;
|
jvm = true;
|
||||||
threadPool = true;
|
threadPool = true;
|
||||||
network = true;
|
|
||||||
transport = true;
|
transport = true;
|
||||||
http = true;
|
http = true;
|
||||||
plugins = true;
|
plugins = true;
|
||||||
|
@ -158,21 +155,6 @@ public class NodesInfoRequest extends BaseNodesRequest<NodesInfoRequest> {
|
||||||
return this;
|
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.
|
* Should the node Transport be returned.
|
||||||
*/
|
*/
|
||||||
|
@ -228,7 +210,6 @@ public class NodesInfoRequest extends BaseNodesRequest<NodesInfoRequest> {
|
||||||
process = in.readBoolean();
|
process = in.readBoolean();
|
||||||
jvm = in.readBoolean();
|
jvm = in.readBoolean();
|
||||||
threadPool = in.readBoolean();
|
threadPool = in.readBoolean();
|
||||||
network = in.readBoolean();
|
|
||||||
transport = in.readBoolean();
|
transport = in.readBoolean();
|
||||||
http = in.readBoolean();
|
http = in.readBoolean();
|
||||||
plugins = in.readBoolean();
|
plugins = in.readBoolean();
|
||||||
|
@ -242,7 +223,6 @@ public class NodesInfoRequest extends BaseNodesRequest<NodesInfoRequest> {
|
||||||
out.writeBoolean(process);
|
out.writeBoolean(process);
|
||||||
out.writeBoolean(jvm);
|
out.writeBoolean(jvm);
|
||||||
out.writeBoolean(threadPool);
|
out.writeBoolean(threadPool);
|
||||||
out.writeBoolean(network);
|
|
||||||
out.writeBoolean(transport);
|
out.writeBoolean(transport);
|
||||||
out.writeBoolean(http);
|
out.writeBoolean(http);
|
||||||
out.writeBoolean(plugins);
|
out.writeBoolean(plugins);
|
||||||
|
|
|
@ -87,14 +87,6 @@ public class NodesInfoRequestBuilder extends NodesOperationRequestBuilder<NodesI
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Should the node Network info be returned.
|
|
||||||
*/
|
|
||||||
public NodesInfoRequestBuilder setNetwork(boolean network) {
|
|
||||||
request.network(network);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should the node Transport info be returned.
|
* Should the node Transport info be returned.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class TransportNodesInfoAction extends TransportNodesAction<NodesInfoRequ
|
||||||
protected NodeInfo nodeOperation(NodeInfoRequest nodeRequest) {
|
protected NodeInfo nodeOperation(NodeInfoRequest nodeRequest) {
|
||||||
NodesInfoRequest request = nodeRequest.request;
|
NodesInfoRequest request = nodeRequest.request;
|
||||||
return nodeService.info(request.settings(), request.os(), request.process(), request.jvm(), request.threadPool(),
|
return nodeService.info(request.settings(), request.os(), request.process(), request.jvm(), request.threadPool(),
|
||||||
request.network(), request.transport(), request.http(), request.plugins());
|
request.transport(), request.http(), request.plugins());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,7 +36,6 @@ public class NodesStatsRequest extends BaseNodesRequest<NodesStatsRequest> {
|
||||||
private boolean process;
|
private boolean process;
|
||||||
private boolean jvm;
|
private boolean jvm;
|
||||||
private boolean threadPool;
|
private boolean threadPool;
|
||||||
private boolean network;
|
|
||||||
private boolean fs;
|
private boolean fs;
|
||||||
private boolean transport;
|
private boolean transport;
|
||||||
private boolean http;
|
private boolean http;
|
||||||
|
@ -63,7 +62,6 @@ public class NodesStatsRequest extends BaseNodesRequest<NodesStatsRequest> {
|
||||||
this.process = true;
|
this.process = true;
|
||||||
this.jvm = true;
|
this.jvm = true;
|
||||||
this.threadPool = true;
|
this.threadPool = true;
|
||||||
this.network = true;
|
|
||||||
this.fs = true;
|
this.fs = true;
|
||||||
this.transport = true;
|
this.transport = true;
|
||||||
this.http = true;
|
this.http = true;
|
||||||
|
@ -81,7 +79,6 @@ public class NodesStatsRequest extends BaseNodesRequest<NodesStatsRequest> {
|
||||||
this.process = false;
|
this.process = false;
|
||||||
this.jvm = false;
|
this.jvm = false;
|
||||||
this.threadPool = false;
|
this.threadPool = false;
|
||||||
this.network = false;
|
|
||||||
this.fs = false;
|
this.fs = false;
|
||||||
this.transport = false;
|
this.transport = false;
|
||||||
this.http = false;
|
this.http = false;
|
||||||
|
@ -171,21 +168,6 @@ public class NodesStatsRequest extends BaseNodesRequest<NodesStatsRequest> {
|
||||||
return this;
|
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.
|
* Should the node file system stats be returned.
|
||||||
*/
|
*/
|
||||||
|
@ -260,7 +242,6 @@ public class NodesStatsRequest extends BaseNodesRequest<NodesStatsRequest> {
|
||||||
process = in.readBoolean();
|
process = in.readBoolean();
|
||||||
jvm = in.readBoolean();
|
jvm = in.readBoolean();
|
||||||
threadPool = in.readBoolean();
|
threadPool = in.readBoolean();
|
||||||
network = in.readBoolean();
|
|
||||||
fs = in.readBoolean();
|
fs = in.readBoolean();
|
||||||
transport = in.readBoolean();
|
transport = in.readBoolean();
|
||||||
http = in.readBoolean();
|
http = in.readBoolean();
|
||||||
|
@ -276,7 +257,6 @@ public class NodesStatsRequest extends BaseNodesRequest<NodesStatsRequest> {
|
||||||
out.writeBoolean(process);
|
out.writeBoolean(process);
|
||||||
out.writeBoolean(jvm);
|
out.writeBoolean(jvm);
|
||||||
out.writeBoolean(threadPool);
|
out.writeBoolean(threadPool);
|
||||||
out.writeBoolean(network);
|
|
||||||
out.writeBoolean(fs);
|
out.writeBoolean(fs);
|
||||||
out.writeBoolean(transport);
|
out.writeBoolean(transport);
|
||||||
out.writeBoolean(http);
|
out.writeBoolean(http);
|
||||||
|
|
|
@ -107,14 +107,6 @@ public class NodesStatsRequestBuilder extends NodesOperationRequestBuilder<Nodes
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Should the node Network stats be returned.
|
|
||||||
*/
|
|
||||||
public NodesStatsRequestBuilder setNetwork(boolean network) {
|
|
||||||
request.network(network);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should the node file system stats be returned.
|
* Should the node file system stats be returned.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class TransportNodesStatsAction extends TransportNodesAction<NodesStatsRe
|
||||||
@Override
|
@Override
|
||||||
protected NodeStats nodeOperation(NodeStatsRequest nodeStatsRequest) {
|
protected NodeStats nodeOperation(NodeStatsRequest nodeStatsRequest) {
|
||||||
NodesStatsRequest request = nodeStatsRequest.request;
|
NodesStatsRequest request = nodeStatsRequest.request;
|
||||||
return nodeService.stats(request.indices(), request.os(), request.process(), request.jvm(), request.threadPool(), request.network(),
|
return nodeService.stats(request.indices(), request.os(), request.process(), request.jvm(), request.threadPool(),
|
||||||
request.fs(), request.transport(), request.http(), request.breaker(), request.script());
|
request.fs(), request.transport(), request.http(), request.breaker(), request.script());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,8 +99,8 @@ public class TransportClusterStatsAction extends TransportNodesAction<ClusterSta
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ClusterStatsNodeResponse nodeOperation(ClusterStatsNodeRequest nodeRequest) {
|
protected ClusterStatsNodeResponse nodeOperation(ClusterStatsNodeRequest nodeRequest) {
|
||||||
NodeInfo nodeInfo = nodeService.info(false, true, false, true, false, false, true, false, true);
|
NodeInfo nodeInfo = nodeService.info(false, true, false, true, false, true, false, true);
|
||||||
NodeStats nodeStats = nodeService.stats(CommonStatsFlags.NONE, false, true, true, false, false, true, false, false, false, false);
|
NodeStats nodeStats = nodeService.stats(CommonStatsFlags.NONE, false, true, true, false, true, false, false, false, false);
|
||||||
List<ShardStats> shardsStats = new ArrayList<>();
|
List<ShardStats> shardsStats = new ArrayList<>();
|
||||||
for (IndexService indexService : indicesService) {
|
for (IndexService indexService : indicesService) {
|
||||||
for (IndexShard indexShard : indexService) {
|
for (IndexShard indexShard : indexService) {
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class NodeService extends AbstractComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public NodeInfo info(boolean settings, boolean os, boolean process, boolean jvm, boolean threadPool,
|
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,
|
return new NodeInfo(version, Build.CURRENT, discovery.localNode(), serviceAttributes,
|
||||||
settings ? this.settings : null,
|
settings ? this.settings : null,
|
||||||
os ? monitorService.osService().info() : 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 fs, boolean transport, boolean http, boolean circuitBreaker,
|
||||||
boolean script) {
|
boolean script) {
|
||||||
// for indices stats we want to include previous allocated shards stats as well (it will
|
// for indices stats we want to include previous allocated shards stats as well (it will
|
||||||
|
|
|
@ -42,7 +42,7 @@ import static org.elasticsearch.rest.RestRequest.Method.GET;
|
||||||
public class RestNodesInfoAction extends BaseRestHandler {
|
public class RestNodesInfoAction extends BaseRestHandler {
|
||||||
|
|
||||||
private final SettingsFilter settingsFilter;
|
private final SettingsFilter settingsFilter;
|
||||||
private final static Set<String> ALLOWED_METRICS = Sets.newHashSet("http", "jvm", "network", "os", "plugins", "process", "settings", "thread_pool", "transport");
|
private final static Set<String> ALLOWED_METRICS = Sets.newHashSet("http", "jvm", "os", "plugins", "process", "settings", "thread_pool", "transport");
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public RestNodesInfoAction(Settings settings, RestController controller, Client client, SettingsFilter settingsFilter) {
|
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.process(metrics.contains("process"));
|
||||||
nodesInfoRequest.jvm(metrics.contains("jvm"));
|
nodesInfoRequest.jvm(metrics.contains("jvm"));
|
||||||
nodesInfoRequest.threadPool(metrics.contains("thread_pool"));
|
nodesInfoRequest.threadPool(metrics.contains("thread_pool"));
|
||||||
nodesInfoRequest.network(metrics.contains("network"));
|
|
||||||
nodesInfoRequest.transport(metrics.contains("transport"));
|
nodesInfoRequest.transport(metrics.contains("transport"));
|
||||||
nodesInfoRequest.http(metrics.contains("http"));
|
nodesInfoRequest.http(metrics.contains("http"));
|
||||||
nodesInfoRequest.plugins(metrics.contains("plugins"));
|
nodesInfoRequest.plugins(metrics.contains("plugins"));
|
||||||
|
|
|
@ -69,7 +69,6 @@ public class RestNodesStatsAction extends BaseRestHandler {
|
||||||
nodesStatsRequest.os(metrics.contains("os"));
|
nodesStatsRequest.os(metrics.contains("os"));
|
||||||
nodesStatsRequest.jvm(metrics.contains("jvm"));
|
nodesStatsRequest.jvm(metrics.contains("jvm"));
|
||||||
nodesStatsRequest.threadPool(metrics.contains("thread_pool"));
|
nodesStatsRequest.threadPool(metrics.contains("thread_pool"));
|
||||||
nodesStatsRequest.network(metrics.contains("network"));
|
|
||||||
nodesStatsRequest.fs(metrics.contains("fs"));
|
nodesStatsRequest.fs(metrics.contains("fs"));
|
||||||
nodesStatsRequest.transport(metrics.contains("transport"));
|
nodesStatsRequest.transport(metrics.contains("transport"));
|
||||||
nodesStatsRequest.http(metrics.contains("http"));
|
nodesStatsRequest.http(metrics.contains("http"));
|
||||||
|
|
|
@ -32,7 +32,6 @@ public class GenericStatsLeak {
|
||||||
Node node = NodeBuilder.nodeBuilder().settings(Settings.settingsBuilder()
|
Node node = NodeBuilder.nodeBuilder().settings(Settings.settingsBuilder()
|
||||||
.put("monitor.os.refresh_interval", 0)
|
.put("monitor.os.refresh_interval", 0)
|
||||||
.put("monitor.process.refresh_interval", 0)
|
.put("monitor.process.refresh_interval", 0)
|
||||||
.put("monitor.network.refresh_interval", 0)
|
|
||||||
).node();
|
).node();
|
||||||
|
|
||||||
JvmService jvmService = node.injector().getInstance(JvmService.class);
|
JvmService jvmService = node.injector().getInstance(JvmService.class);
|
||||||
|
|
|
@ -94,7 +94,6 @@ import org.elasticsearch.node.NodeMocksPlugin;
|
||||||
import org.elasticsearch.node.internal.InternalSettingsPreparer;
|
import org.elasticsearch.node.internal.InternalSettingsPreparer;
|
||||||
import org.elasticsearch.node.service.NodeService;
|
import org.elasticsearch.node.service.NodeService;
|
||||||
import org.elasticsearch.script.ScriptService;
|
import org.elasticsearch.script.ScriptService;
|
||||||
import org.elasticsearch.search.SearchModule;
|
|
||||||
import org.elasticsearch.search.SearchService;
|
import org.elasticsearch.search.SearchService;
|
||||||
import org.elasticsearch.test.disruption.ServiceDisruptionScheme;
|
import org.elasticsearch.test.disruption.ServiceDisruptionScheme;
|
||||||
import org.elasticsearch.search.MockSearchService;
|
import org.elasticsearch.search.MockSearchService;
|
||||||
|
@ -1865,7 +1864,7 @@ public final class InternalTestCluster extends TestCluster {
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeService nodeService = getInstanceFromNode(NodeService.class, nodeAndClient.node);
|
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("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("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));
|
assertThat("FixedBitSet cache size must be 0 on node: " + stats.getNode(), stats.getIndices().getSegments().getBitsetMemoryInBytes(), equalTo(0l));
|
||||||
|
|
Loading…
Reference in New Issue