JacksonYao287 commented on a change in pull request #2028:
URL: https://github.com/apache/ozone/pull/2028#discussion_r592354456
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServerImpl.java
##########
@@ -94,8 +94,10 @@ public static void initialize(String clusterId, String scmId,
try {
server = newRaftServer(scmId, conf).setGroup(group).build();
server.start();
- // TODO: Timeout and sleep interval should be made configurable
- waitForLeaderToBeReady(server, 60000, group);
+ final SCMHAConfiguration haConf =
conf.getObject(SCMHAConfiguration.class);
+ long waitTimeout = haConf.getLeaderReadyWaitTimeout();
+ long retryInterval = haConf.getLeaderReadyCheckInterval();
+ waitForLeaderToBeReady(server, waitTimeout, retryInterval, group);
Review comment:
here, conf is an OzoneConfiguration object which can not read out
retryInterval and waitTimeout directly. So, for now , i have to get a
SCMHAConfiguration to do this. It seems better to pass conf to
waitForLeaderToBeReady,done.
maybe we can unify SCMHAConfiguration to OzoneConfiguration later, and then
there will be only one Configuration for scm. what do you think about it?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]