Gargi-jais11 commented on code in PR #10022:
URL: https://github.com/apache/ozone/pull/10022#discussion_r3121546858
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerConfiguration.java:
##########
@@ -262,17 +287,80 @@ public void setParallelThread(int parallelThread) {
this.parallelThread = parallelThread;
}
+ public String getContainerStates() {
+ return containerStates;
+ }
+
+ public void setContainerStates(String containerStates) {
+ this.containerStates = containerStates;
+ }
+
+ /**
+ * Container lifecycle states eligible for disk balancing, parsed from
{@link #getContainerStates()}:
+ * a comma-separated list of {@link State} names (case-sensitive, uppercase;
whitespace trimmed).
+ *
+ * @return unmodifiable non-empty set
+ */
+ public Set<State> getMovableContainerStates() {
Review Comment:
As far as I understand the contsructor cannot validate because `@Config`
fields are injected via reflection after the constructor returns
(field.set(obj, value) in injectConfiguration). The constructor only ever sees
the default value of the field not the configured value. So we cannot move
`parseMovableContainerStates` in constructor.
--
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]