JacksonYao287 commented on a change in pull request #2893:
URL: https://github.com/apache/ozone/pull/2893#discussion_r767443002
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java
##########
@@ -120,7 +120,9 @@ public ContainerBalancer(
this.containerManager = containerManager;
this.replicationManager = replicationManager;
this.ozoneConfiguration = ozoneConfiguration;
- this.config = new ContainerBalancerConfiguration(ozoneConfiguration);
+ this.config = ozoneConfiguration.
+ getObject(ContainerBalancerConfiguration.class);
+ config.initialize(ozoneConfiguration);
Review comment:
may be we can add a static build function to
`ContainerBalancerConfiguration` class to build and initialize a
ContainerBalancerConfiguration instance, for example:
```
public static ContainerBalancerConfiguration buildFrom(ozoneConfiguration
oc) {
.....
}
```
--
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]