Tejaskriya commented on code in PR #6537:
URL: https://github.com/apache/ozone/pull/6537#discussion_r1591937300
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/balancer/MockedSCM.java:
##########
@@ -137,7 +137,6 @@ public String toString() {
}
public @Nonnull ContainerBalancerTask startBalancerTask(@Nonnull
ContainerBalancerConfiguration config) {
- init(config);
Review Comment:
In TestContainerBalancerDatanodeNodeLimit, each time init(config) is called,
it is followed by startBalancerTask. We could retain this line and avoid
calling mockedSCM.init() in every test case in
TestContainerBalancerDatanodeNodeLimit.
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/balancer/TestContainerBalancerDatanodeNodeLimit.java:
##########
@@ -79,6 +96,7 @@ public void
containerBalancerShouldObeyMaxDatanodesToInvolveLimit(@Nonnull Mocke
}
config.setIterations(1);
config.setMaxSizeToMovePerIteration(50 * STORAGE_UNIT);
+ mockedSCM.init(config);
Review Comment:
Relating to the above comment, we would not require to call init here
specifically. Similarly for all the test cases in this class.
What is the reason to remove init call within startBalancerTask?
--
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]