szetszwo commented on code in PR #9505:
URL: https://github.com/apache/ozone/pull/9505#discussion_r2624086824
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerVolumeCalculation.java:
##########
@@ -126,4 +125,47 @@ public static double
calculateVolumeDataDensity(ImmutableList<HddsVolume> volume
return -1.0;
}
}
+
+ public static double computeUtilization(HddsVolume volume, long required) {
+ return computeUtilization(volume.getCurrentUsage(),
volume.getCommittedBytes(), required);
Review Comment:
For correctness, it is okay since it is used in choosing container. But for
performance, it is better to get it first and keep using the same object. Let
me change it.
--
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]