kerneltime commented on code in PR #4067:
URL: https://github.com/apache/ozone/pull/4067#discussion_r1050498141
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/AbstractFindTargetGreedy.java:
##########
@@ -185,10 +192,26 @@ private boolean canSizeEnterTarget(DatanodeDetails
target, long size) {
// MaxSizeEnteringTarget
//2 current usage of target datanode plus sizeEnteringAfterMove
// is smaller than or equal to upperLimit
- return sizeEnteringAfterMove <= config.getMaxSizeEnteringTarget() &&
- Double.compare(nodeManager.getUsageInfo(target)
- .calculateUtilization(sizeEnteringAfterMove), upperLimit) <= 0;
+ if (sizeEnteringAfterMove > config.getMaxSizeEnteringTarget()) {
+ logger.debug("{} bytes cannot enter datanode {} because 'size" +
+ ".entering.target.max' limit is {} and {} bytes have already "
+
+ "entered.", size, target.getUuidString(),
+ config.getMaxSizeEnteringTarget(),
+ sizeEnteringNode.get(target));
+ return false;
+ }
+ if (Double.compare(nodeManager.getUsageInfo(target)
+ .calculateUtilization(sizeEnteringAfterMove), upperLimit) > 0) {
+ logger.debug("{} bytes cannot enter datanode {} because its " +
+ "utilization will exceed the upper limit of {}.", size,
+ target.getUuidString(), upperLimit);
+ return false;
+ }
+ return true;
}
+
+ logger.warn("No record of how much size has entered datanode {}",
Review Comment:
Is this `warn` worth? or should should it be a `debug` or `info`?
--
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]