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/03/11 11:58:41 UTC
[GitHub] [ozone] JacksonYao287 opened a new pull request #2028: HDDS-4877. Make SCM ratis server spin up time during initialization c…
JacksonYao287 opened a new pull request #2028:
URL: https://github.com/apache/ozone/pull/2028
## What changes were proposed in this pull request?
Make SCM ratis server spin up time during initialization configurable
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4877
## How was this patch tested?
unit test
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] GlenGeng commented on a change in pull request #2028: HDDS-4877. Make SCM ratis server spin up time during initialization c…
Posted by GitBox <gi...@apache.org>.
GlenGeng commented on a change in pull request #2028:
URL: https://github.com/apache/ozone/pull/2028#discussion_r592308321
##########
File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAConfiguration.java
##########
@@ -156,6 +156,22 @@
)
private long ratisLeaderElectionTimeout = 5 * 1000L;
+ @Config(key = "ratis.leader.ready.wait.timeout",
+ type = ConfigType.TIME,
+ defaultValue = "60s",
Review comment:
indent. just 4 spaces.
##########
File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAConfiguration.java
##########
@@ -280,6 +296,10 @@ public long getLeaderElectionMaxTimeout() {
return ratisLeaderElectionTimeout + 200L;
}
+ public long getLeaderReadyWaitTimeout() { return ratisLeaderReadyWaitTimeout;}
Review comment:
```
public long getLeaderReadyWaitTimeout() {
return ratisLeaderReadyWaitTimeout;
}
```
Better has setter too.
##########
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:
How about just pass `conf` to `waitForLeaderToBeReady`, and read out `retryInterval` and `waitTimeout` there ?
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] amaliujia merged pull request #2028: HDDS-4877. Make SCM ratis server spin up time during initialization c…
Posted by GitBox <gi...@apache.org>.
amaliujia merged pull request #2028:
URL: https://github.com/apache/ozone/pull/2028
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] amaliujia commented on pull request #2028: HDDS-4877. Make SCM ratis server spin up time during initialization c…
Posted by GitBox <gi...@apache.org>.
amaliujia commented on pull request #2028:
URL: https://github.com/apache/ozone/pull/2028#issuecomment-796961754
LGTM
Thanks @JacksonYao287 for your contribution! Thanks @GlenGeng for your review!
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] JacksonYao287 commented on a change in pull request #2028: HDDS-4877. Make SCM ratis server spin up time during initialization c…
Posted by GitBox <gi...@apache.org>.
JacksonYao287 commented on a change in pull request #2028:
URL: https://github.com/apache/ozone/pull/2028#discussion_r592349455
##########
File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAConfiguration.java
##########
@@ -156,6 +156,22 @@
)
private long ratisLeaderElectionTimeout = 5 * 1000L;
+ @Config(key = "ratis.leader.ready.wait.timeout",
+ type = ConfigType.TIME,
+ defaultValue = "60s",
Review comment:
thanks , fixed
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] JacksonYao287 commented on a change in pull request #2028: HDDS-4877. Make SCM ratis server spin up time during initialization c…
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] JacksonYao287 commented on a change in pull request #2028: HDDS-4877. Make SCM ratis server spin up time during initialization c…
Posted by GitBox <gi...@apache.org>.
JacksonYao287 commented on a change in pull request #2028:
URL: https://github.com/apache/ozone/pull/2028#discussion_r592350134
##########
File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAConfiguration.java
##########
@@ -280,6 +296,10 @@ public long getLeaderElectionMaxTimeout() {
return ratisLeaderElectionTimeout + 200L;
}
+ public long getLeaderReadyWaitTimeout() { return ratisLeaderReadyWaitTimeout;}
Review comment:
@GlenGeng thanks , a setter has been added
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] JacksonYao287 commented on a change in pull request #2028: HDDS-4877. Make SCM ratis server spin up time during initialization c…
Posted by GitBox <gi...@apache.org>.
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. but 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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org