ssulav commented on code in PR #10308:
URL: https://github.com/apache/ozone/pull/10308#discussion_r3265596688


##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerReportSubcommand.java:
##########
@@ -192,7 +192,7 @@ private Map<String, Object> 
toJson(DatanodeDiskBalancerInfoProto report) {
         && report.getDiskBalancerConf().hasThreshold()) {
       double idealUsage = report.getIdealUsage();
       double threshold = report.getDiskBalancerConf().getThreshold();
-      double lt = idealUsage - threshold / 100.0;
+      double lt = Math.max(0.0, idealUsage - threshold / 100.0);
       double ut = idealUsage + threshold / 100.0;

Review Comment:
   Is it possible that upper bound it can go beyond 100%?



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