sadanand48 commented on code in PR #5285:
URL: https://github.com/apache/ozone/pull/5285#discussion_r1326928609
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/ContainerImporter.java:
##########
@@ -65,9 +63,7 @@ public ContainerImporter(ConfigurationSource conf,
ContainerSet containerSet,
this.controller = controller;
this.volumeSet = volumeSet;
try {
- volumeChoosingPolicy = conf.getClass(
- HDDS_DATANODE_VOLUME_CHOOSING_POLICY, RoundRobinVolumeChoosingPolicy
- .class, VolumeChoosingPolicy.class).newInstance();
+ volumeChoosingPolicy = VolumeChoosingPolicyFactory.getPolicy(conf);
Review Comment:
Classes inside `org.apache.hadoop.ozone.container.common.volume` can't be
accessed in HDDSConfigKeys as the `common` module doesn't depend on the`
container-service` module. The other way is to hardcode the class name as a
string but this might pose a problem if some one changes the location of the
class.
Just checked Even Container placement policy uses a factory class to get its
impls.
--
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]