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



##########
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:
       @adoroszlai, The idea here is that we plan to move the defaults to 
server side. 
(https://github.com/apache/ozone/pull/2401#issuecomment-880020034). If no 
configs defined in defaults xml, we don't want to pass anything from client, 
instead we wanted to choose defaults at server side. If we take defaults in 
java even though we remove defaults in configs, we will never get into that 
above condition to choose at server.
   Server side we planned to introduce two levels, one is at bucket level 
defaults( users can set on bucket) and global server side defaults when client 
and bucket does not have any defaults.
   Since the current change would not cause any backward compat issue I think 
it should be ok to go with it?
   cc: @sodonnel 




-- 
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]

Reply via email to