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


##########
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerStatusSubcommand.java:
##########
@@ -85,9 +88,20 @@ private String generateStatus(
           String.valueOf(proto.getDiskBalancerConf().getParallelThread()));
       contentList.add(String.valueOf(proto.getSuccessMoveCount()));
       contentList.add(String.valueOf(proto.getFailureMoveCount()));
+      contentList.add(estimatedTimeLeft >= 0 ? String.format("%.2f", 
estimatedTimeLeft) : "N/A");
     }
 
     return String.format(formatBuilder.toString(),
         contentList.toArray(new String[0]));
   }
+
+  private double 
calculateEstimatedTimeLeft(HddsProtos.DatanodeDiskBalancerInfoProto proto) {
+    long estimatedDataPendingToMove = 
proto.getEstimatedTotalSizePendingToMove();

Review Comment:
   if estimatedDataPendingToMove is 0, no need to continue the calculation.



-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to