zhangshuyan0 commented on code in PR #5715:
URL: https://github.com/apache/hadoop/pull/5715#discussion_r1218001003
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/BalancingPolicy.java:
##########
@@ -104,21 +104,21 @@ void accumulateSpaces(DatanodeStorageReport r) {
for(StorageReport s : r.getStorageReports()) {
Review Comment:
The goal of `BalancingPolicy.Pool` is to balance each pool in each datanode.
If we use `(capacity - remaining)/capacity` to compute `util` here, it must be
greater or equal than `blockPoolUsed/capacity`. In this way, each block pool
will get the same util, so the initial goal will not be achieved. All in all,
`s.getRemaining()` is at Node level, so I think it not very properly to modify
`BalancingPolicy.Pool`.
--
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]