sreejasahithi commented on code in PR #11342:
URL: https://github.com/apache/ozone/pull/11342#discussion_r4141078864
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerAdvisor.java:
##########
@@ -255,6 +445,11 @@ private static void
validateSnapshotForEstimation(ContainerBalancerClusterSnapsh
if (snapshot.getBytesToMove() <= 0) {
throw new IllegalArgumentException("No bytes to move.");
}
+ if (snapshot.getBytesToMove() < containerSizeBytes) {
+ throw new IllegalArgumentException(
+ "Bytes to move (" + snapshot.getBytesToMove()
+ + ") is less than container size (" + containerSizeBytes
+ ").");
+ }
Review Comment:
The real balancer selects containers by actual container.getUsedBytes(), so
it can still move smaller containers. We should not throw exception here.
--
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]