lokeshj1703 commented on a change in pull request #2808: URL: https://github.com/apache/ozone/pull/2808#discussion_r752118100
########## File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/FindTargetGreedy.java ########## @@ -60,17 +61,27 @@ public FindTargetGreedy( this.containerManager = containerManager; this.placementPolicy = placementPolicy; this.nodeManager = nodeManager; + + potentialTargets = new TreeSet<>((a, b) -> { + double currentUsageOfA = a.calculateUtilization( + sizeEnteringNode.get(a.getDatanodeDetails())); + double currentUsageOfB = b.calculateUtilization( + sizeEnteringNode.get(b.getDatanodeDetails())); + return Double.compare(currentUsageOfA, currentUsageOfB); Review comment: +1 o.w. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org