This is an automated email from the ASF dual-hosted git repository.
zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new f7783249f [MINOR] Fix ShutdownHookManager#shutdownExecutor log's unit
f7783249f is described below
commit f7783249f5ee636177570fc3b25e7c33953a8343
Author: onebox-li <[email protected]>
AuthorDate: Thu Oct 19 22:30:47 2023 +0800
[MINOR] Fix ShutdownHookManager#shutdownExecutor log's unit
### What changes were proposed in this pull request?
As title
### Why are the changes needed?
Ditto
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Manual test
Closes #2004 from onebox-li/fix-shutdown-log.
Authored-by: onebox-li <[email protected]>
Signed-off-by: zky.zhoukeyong <[email protected]>
---
.../java/org/apache/celeborn/common/util/ShutdownHookManager.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
a/common/src/main/java/org/apache/celeborn/common/util/ShutdownHookManager.java
b/common/src/main/java/org/apache/celeborn/common/util/ShutdownHookManager.java
index 1ab360ae6..523d4c0e5 100644
---
a/common/src/main/java/org/apache/celeborn/common/util/ShutdownHookManager.java
+++
b/common/src/main/java/org/apache/celeborn/common/util/ShutdownHookManager.java
@@ -59,7 +59,7 @@ public final class ShutdownHookManager {
/** Minimum shutdown timeout: {@value} millisecond(s). */
public static final long TIMEOUT_MINIMUM = 1000;
- /** The default time unit used: seconds. */
+ /** The default time unit used: millisecond. */
public static final TimeUnit TIME_UNIT_DEFAULT = TimeUnit.MILLISECONDS;
private static final ExecutorService EXECUTOR =
@@ -131,13 +131,12 @@ public final class ShutdownHookManager {
EXECUTOR.shutdown();
long shutdownTimeout = getShutdownTimeout(conf);
if (!EXECUTOR.awaitTermination(shutdownTimeout, TIME_UNIT_DEFAULT)) {
- // timeout waiting for the
- LOG.error("ShutdownHookManger shutdown forcefully after {} seconds.",
shutdownTimeout);
+ // timeout waiting for the executor termination
+ LOG.error("ShutdownHookManger shutdown forcefully after {} ms.",
shutdownTimeout);
EXECUTOR.shutdownNow();
}
LOG.debug("ShutdownHookManger completed shutdown.");
} catch (InterruptedException ex) {
- // interrupted.
LOG.error("ShutdownHookManger interrupted while waiting for
termination.", ex);
EXECUTOR.shutdownNow();
Thread.currentThread().interrupt();