File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
server/src/main/java/org/elasticsearch/cluster Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ protected ClusterInfo() {
7272 * @param shardDataSetSizes a shard id to data set size in bytes mapping per shard
7373 * @param dataPath the shard routing to datapath mapping
7474 * @param reservedSpace reserved space per shard broken down by node and data path
75+ * @param nodesHeapUsage heap usage broken down by node
7576 * @see #shardIdentifierFromRouting
7677 */
7778 public ClusterInfo (
@@ -216,6 +217,15 @@ public Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params params
216217 );
217218 }
218219
220+ /**
221+ * Returns a node id to estimated heap usage mapping for all nodes that we have such data for.
222+ * Note that these estimates should be considered minimums. They may be used to determine whether
223+ * there IS NOT capacity to do something, but not to determine that there IS capacity to do something.
224+ */
225+ public Map <String , HeapUsage > getNodesHeapUsage () {
226+ return nodesHeapUsage ;
227+ }
228+
219229 /**
220230 * Returns a node id to disk usage mapping for the path that has the least available space on the node.
221231 * Note that this does not take account of reserved space: there may be another path with less available _and unreserved_ space.
You can’t perform that action at this time.
0 commit comments