Skip to content

Commit 1b0d35a

Browse files
committed
Use AllocationStats instead of map
1 parent 6f41c89 commit 1b0d35a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/DesiredBalanceMetrics.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ public long undesiredAllocations() {
256256
return lastReconciliationAllocationStats.undesiredAllocationsExcludingShuttingDownNodes();
257257
}
258258

259-
public Map<ShardRouting.Role, RoleAllocationStats> allocationStatsByRole() {
260-
return lastReconciliationAllocationStats.allocationStatsByRole();
259+
public AllocationStats allocationStatsByRole() {
260+
return lastReconciliationAllocationStats;
261261
}
262262

263263
private List<LongWithAttributes> getUnassignedShardsMetrics() {

server/src/main/java/org/elasticsearch/cluster/routing/allocation/allocator/DesiredBalanceShardsAllocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ public DesiredBalanceStats getStats() {
438438
);
439439
}
440440

441-
public Map<ShardRouting.Role, DesiredBalanceMetrics.RoleAllocationStats> getAllocationStatsByRole() {
441+
public DesiredBalanceMetrics.AllocationStats getAllocationStatsByRole() {
442442
return desiredBalanceMetrics.allocationStatsByRole();
443443
}
444444

0 commit comments

Comments
 (0)