adoroszlai commented on code in PR #4967:
URL: https://github.com/apache/ozone/pull/4967#discussion_r1243648023


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerManagerImpl.java:
##########
@@ -471,4 +444,37 @@ public ContainerStateManager getContainerStateManager() {
   public SCMHAManager getSCMHAManager() {
     return haManager;
   }
+
+  private static List<ContainerID> filterSortAndLimit(

Review Comment:
   Thanks for the suggestion, I'll update the patch with it.
   
   FYI there is a bug in that solution due to 
[`PriorityQueue#iterator()`](https://docs.oracle.com/javase/8/docs/api/java/util/PriorityQueue.html#iterator--):
   
   > The iterator does not return the elements in any particular order.
   
   so `new ArrayList<>(maxHeap)` randomizes the result.
   
   It seemsto work for (small?) `Integers`, but not for any random `Comparable`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to