|
|
@@ -122,12 +122,14 @@ public class AutoscalingNodeInfoService {
|
|
|
nodeToMemory = Collections.unmodifiableMap(builder);
|
|
|
}
|
|
|
};
|
|
|
+ final NodesStatsRequest nodesStatsRequest = new NodesStatsRequest(
|
|
|
+ missingNodes.stream().map(DiscoveryNode::getId).toArray(String[]::new)
|
|
|
+ ).clear().addMetric(NodesStatsRequest.Metric.OS.metricName()).timeout(fetchTimeout);
|
|
|
+ nodesStatsRequest.setIncludeShardsStats(false);
|
|
|
client.admin()
|
|
|
.cluster()
|
|
|
.nodesStats(
|
|
|
- new NodesStatsRequest(missingNodes.stream().map(DiscoveryNode::getId).toArray(String[]::new)).clear()
|
|
|
- .addMetric(NodesStatsRequest.Metric.OS.metricName())
|
|
|
- .timeout(fetchTimeout),
|
|
|
+ nodesStatsRequest,
|
|
|
ActionListener.wrap(
|
|
|
nodesStatsResponse -> client.admin()
|
|
|
.cluster()
|