You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2020/06/01 17:11:05 UTC

[GitHub] [incubator-gobblin] autumnust commented on a change in pull request #3002: GOBBLIN-1162: Provide an option to allow slow containers to commit su…

autumnust commented on a change in pull request #3002:
URL: https://github.com/apache/incubator-gobblin/pull/3002#discussion_r433370451



##########
File path: gobblin-yarn/src/main/java/org/apache/gobblin/yarn/GobblinYarnTaskRunner.java
##########
@@ -209,6 +210,12 @@ public static void main(String[] args) throws Exception {
     } catch (ParseException pe) {
       printUsage(options);
       System.exit(1);
+    } catch (ContainerHealthCheckException e) {
+      // Ideally, we should not be catching this exception, as this is indicative of a non-recoverable exception. However,
+      // simply propagating the exception may prevent the container exit due to the presence of non-daemon threads present
+      // in the application. Hence, we catch this exception to invoke System.exit() which in turn ensures that all non-daemon threads are killed.
+      LOGGER.error("Exception encountered: {}", e);
+      System.exit(1);

Review comment:
       Sounds good !




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