peterxcli commented on code in PR #10308:
URL: https://github.com/apache/ozone/pull/10308#discussion_r3268576728
##########
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerReportSubcommand.java:
##########
@@ -108,8 +108,8 @@ private String
generateReport(List<DatanodeDiskBalancerInfoProto> protos) {
&& p.getDiskBalancerConf().hasThreshold()) {
double idealUsage = p.getIdealUsage();
double threshold = p.getDiskBalancerConf().getThreshold();
- double lt = idealUsage - threshold / 100.0;
- double ut = idealUsage + threshold / 100.0;
+ double lt = Math.max(0.0, idealUsage - threshold / 100.0);
Review Comment:
the choosing policy also need this clip?
https://github.com/apache/ozone/blob/c0781aa9ec66d59bc1bbb4cf2ef6bb69ce2a596c/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/policy/DefaultContainerChoosingPolicy.java#L94-L98
--
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]