This is an automated email from the ASF dual-hosted git repository.

zhouky pushed a commit to branch branch-0.3
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/branch-0.3 by this push:
     new f990dcd13 [MINOR] Fix ShutdownHookManager#shutdownExecutor log's unit
f990dcd13 is described below

commit f990dcd133ac5eebdddcbf3762527c7ac7a620d4
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]>
    (cherry picked from commit f7783249f5ee636177570fc3b25e7c33953a8343)
    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 3439a6ba1..5e6a53039 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
@@ -61,7 +61,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 =
@@ -133,13 +133,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();

Reply via email to