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 2022/06/21 15:13:58 UTC

[GitHub] [ozone] adoroszlai commented on a diff in pull request #3510: HDDS-6877. Keep replication port unchanged when restarting datanode in MiniOzoneCluster

adoroszlai commented on code in PR #3510:
URL: https://github.com/apache/ozone/pull/3510#discussion_r902749794


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java:
##########
@@ -414,6 +415,8 @@ public void restartHddsDatanode(int i, boolean waitForDatanode)
         dn.getPort(RATIS_ADMIN).getValue());
     config.setInt(DFS_CONTAINER_RATIS_SERVER_PORT,
         dn.getPort(RATIS_SERVER).getValue());
+    config.setFromObject(new ReplicationConfig()
+        .setPort(dn.getPort(REPLICATION).getValue()));

Review Comment:
   This would apply the default settings for other properties handled by `ReplicationConfig` (currently only `streams.limit`) to `config`, rather retain `config`'s current values for the same.  To avoid that, we need to instantiate `ReplicationConfig` from `config`:
   
   ```suggestion
       config.setFromObject(conf.getObject(ReplicationConfig.class)
           .setPort(dn.getPort(REPLICATION).getValue()));
   ```



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