ChenSammi commented on code in PR #9068:
URL: https://github.com/apache/ozone/pull/9068#discussion_r2418906013


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/policy/DefaultContainerChoosingPolicy.java:
##########
@@ -49,31 +51,70 @@ public class DefaultContainerChoosingPolicy implements 
ContainerChoosingPolicy {
 
   @Override
   public ContainerData chooseContainer(OzoneContainer ozoneContainer,
-      HddsVolume hddsVolume, Set<ContainerID> inProgressContainerIDs) {
+      HddsVolume srcVolume, HddsVolume destVolume,
+      Set<ContainerID> inProgressContainerIDs,
+      Double threshold, MutableVolumeSet volumeSet) {
     Iterator<Container<?>> itr;
     try {
-      itr = CACHE.get().get(hddsVolume,
-          () -> ozoneContainer.getController().getContainers(hddsVolume));
+      itr = CACHE.get().get(srcVolume,
+          () -> ozoneContainer.getController().getContainers(srcVolume));
     } catch (ExecutionException e) {
-      LOG.warn("Failed to get container iterator for volume {}", hddsVolume, 
e);
+      LOG.warn("Failed to get container iterator for volume {}", srcVolume, e);
       return null;
     }
 
+    // Calculate maxAllowedUtilization
+    double idealUsage = volumeSet.getIdealUsage();

Review Comment:
   @Gargi-jais11 , does it make sense to consider the CommittedBytes, and delta 
value of source volume in IdealUsage calculation too?  
   



-- 
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