yandrey321 commented on code in PR #10355:
URL: https://github.com/apache/ozone/pull/10355#discussion_r3310865473


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerVolumeCalculation.java:
##########
@@ -167,13 +166,15 @@ public static final class VolumeFixedUsage {
     private final HddsVolume volume;
     private final SpaceUsageSource.Fixed usage;
     private final long effectiveUsed;
-    private final Double utilization;
+    private final double utilization;
 
     private VolumeFixedUsage(HddsVolume volume, long delta) {
       this.volume = volume;
       this.usage = volume.getCurrentUsage();
       this.effectiveUsed = computeEffectiveUsage(usage, 
volume.getCommittedBytes(), delta);
-      this.utilization = usage.getCapacity() > 0 ? computeUtilization(usage, 
volume.getCommittedBytes(), delta) : null;
+      this.utilization = usage.getCapacity() > 0
+          ? computeUtilization(usage, volume.getCommittedBytes(), delta)
+          : 0.0;

Review Comment:
   if there is no Capacity, should utilization be 100%? Would 0 utilization be 
treated that volume is a candidate for moving data or creating containers?



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