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/07/20 07:49:14 UTC

[GitHub] [ozone] jojochuang commented on a change in pull request #2440: HDDS-5467. Handle potential InterruptedException in Ozone

jojochuang commented on a change in pull request #2440:
URL: https://github.com/apache/ozone/pull/2440#discussion_r672888678



##########
File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/util/ShutdownHookManager.java
##########
@@ -134,9 +130,12 @@ int executeShutdown() {
         future.cancel(true);
         LOG.warn("ShutdownHook '" + entry.getHook().getClass().
             getSimpleName() + "' timeout, " + ex.toString(), ex);
-      } catch (Throwable ex) {
+      } catch (InterruptedException ex) {
         LOG.warn("ShutdownHook '" + entry.getHook().getClass().
             getSimpleName() + "' failed, " + ex.toString(), ex);
+        Thread.currentThread().interrupt();
+      } catch (ExecutionException ex) {
+        ex.printStackTrace();

Review comment:
       please use LOG to record the exception.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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