|
36 | 36 | import static org.elasticsearch.cluster.routing.ShardRouting.newUnassigned;
|
37 | 37 | import static org.elasticsearch.cluster.routing.UnassignedInfo.Reason.REINITIALIZED;
|
38 | 38 | import static org.elasticsearch.common.xcontent.ChunkedToXContentHelper.chunk;
|
39 |
| -import static org.elasticsearch.common.xcontent.ChunkedToXContentHelper.endObject; |
| 39 | +import static org.elasticsearch.common.xcontent.ChunkedToXContentHelper.endArray; |
40 | 40 | import static org.elasticsearch.common.xcontent.ChunkedToXContentHelper.startObject;
|
41 | 41 |
|
42 | 42 | /**
|
@@ -203,17 +203,7 @@ public Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params params
|
203 | 203 | }
|
204 | 204 | return builder.endObject(); // NodeAndPath
|
205 | 205 | }),
|
206 |
| - chunk( |
207 |
| - (builder, p) -> builder.endArray() // end "reserved_sizes" |
208 |
| - .startObject("heap_usage") |
209 |
| - ), |
210 |
| - Iterators.map(nodesHeapUsage.entrySet().iterator(), c -> (builder, p) -> { |
211 |
| - builder.startObject(c.getKey()); |
212 |
| - c.getValue().toShortXContent(builder); |
213 |
| - builder.endObject(); |
214 |
| - return builder; |
215 |
| - }), |
216 |
| - endObject() // end "heap_usage" |
| 206 | + endArray() // end "reserved_sizes" |
217 | 207 | );
|
218 | 208 | }
|
219 | 209 |
|
@@ -334,8 +324,7 @@ public String toString() {
|
334 | 324 |
|
335 | 325 | // exposed for tests, computed here rather than exposing all the collections separately
|
336 | 326 | int getChunkCount() {
|
337 |
| - return leastAvailableSpaceUsage.size() + shardSizes.size() + shardDataSetSizes.size() + dataPath.size() + reservedSpace.size() |
338 |
| - + nodesHeapUsage.size() + 7; |
| 327 | + return leastAvailableSpaceUsage.size() + shardSizes.size() + shardDataSetSizes.size() + dataPath.size() + reservedSpace.size() + 6; |
339 | 328 | }
|
340 | 329 |
|
341 | 330 | public record NodeAndShard(String nodeId, ShardId shardId) implements Writeable {
|
|
0 commit comments