You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/08/02 14:31:13 UTC

[GitHub] [ozone] adoroszlai commented on a change in pull request #2430: HDDS-5460: ReplicationConfig#getDefault is hardcoded with RatisReplicationConfig

adoroszlai commented on a change in pull request #2430:
URL: https://github.com/apache/ozone/pull/2430#discussion_r681021306



##########
File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/ReplicationConfig.java
##########
@@ -63,7 +64,14 @@ static ReplicationConfig fromTypeAndFactor(
   }
 
   static ReplicationConfig getDefault(ConfigurationSource config) {
-    return new RatisReplicationConfig(HddsProtos.ReplicationFactor.THREE);
+    String replication = config.get(OzoneConfigKeys.OZONE_REPLICATION);
+    String replType = config.get(OzoneConfigKeys.OZONE_REPLICATION_TYPE);
+    ReplicationConfig replicationConfig = null;
+    if (replication != null && replType != null) {
+      replicationConfig = ReplicationConfig
+          .fromTypeAndString(ReplicationType.valueOf(replType), replication);
+    }

Review comment:
       Thanks for the explanation.




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org