bharatviswa504 commented on a change in pull request #2299:
URL: https://github.com/apache/ozone/pull/2299#discussion_r644474492
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManagerStarter.java
##########
@@ -164,7 +166,15 @@ private void commonInit() {
public void start(OzoneConfiguration conf) throws Exception {
StorageContainerManager stm = StorageContainerManager.createSCM(conf);
stm.start();
- stm.join();
+
+ ShutdownHookManager.get().addShutdownHook(() -> {
Review comment:
I see the default is 30 seconds.
```
/** Default shutdown hook timeout: {@value} seconds. */
public static final long SERVICE_SHUTDOWN_TIMEOUT_DEFAULT = 30;
static long getShutdownTimeout(Configuration conf) {
long duration = conf.getTimeDuration(
SERVICE_SHUTDOWN_TIMEOUT,
SERVICE_SHUTDOWN_TIMEOUT_DEFAULT,
TIME_UNIT_DEFAULT);
if (duration < TIMEOUT_MINIMUM) {
duration = TIMEOUT_MINIMUM;
}
return duration;
}
```
--
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]