cameronlee314 commented on a change in pull request #1583:
URL: https://github.com/apache/samza/pull/1583#discussion_r806172524
##########
File path:
samza-core/src/main/java/org/apache/samza/runtime/ContainerLaunchUtil.java
##########
@@ -179,15 +181,26 @@ private static void run(
if (containerRunnerException != null) {
log.error("Container stopped with Exception. Exiting process now.",
containerRunnerException);
- System.exit(1);
+ exitProcess(1);
}
} catch (Throwable e) {
- log.error("Container stopped with Exception. ",
containerRunnerException);
+ log.error("Exiting the process due to {}. \nContainer runner exception:
{}", e, containerRunnerException);
+ exitProcess(1);
Review comment:
I believe `System.exit` will prevent the `finally` block from executing,
so you are slightly changing the currently functionality. That's probably ok,
since the `containerRunnerException != null` case above already does
`System.exit` and doing clean up shouldn't be absolutely necessary, but I
wanted to just point it out in case you think it should be something to handle
or leave a comment about.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]