[
https://issues.apache.org/jira/browse/ACCUMULO-1709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13765261#comment-13765261
]
Steve Loughran commented on ACCUMULO-1709:
------------------------------------------
I assumed the main stuff was there so that if someone invoked the main directly
rather than via start then an exception is caught, logged via log4j and then
the exit kicks in. Which seems good to me for both the logging -it will go to
syslog or wherever, and so that if I bypass start and its classloading,
failures sill get picked up.
In Hadoop 2 we have a whole class dedicated to exits,
[https://github.com/apache/hadoop-common/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java],
which
# lets you turn system exiting off (so that tests don't fail, or when you run
under a security manager with exit disabled)
# has an exit exception that returns an exit code
# can extract
Somewhere there's a JIRA of mine (HADOOP-9626) to add a {{getExitCode()}}
interface to get the exit code out of any exception that chooses to declare it,
so that entry points can field exceptions coming up from below that declare an
explicit exit code. This wouldn't impact the structure you have here, except it
would give your lower-level code more control than today
> failing Master doesn't set exit code of process
> -----------------------------------------------
>
> Key: ACCUMULO-1709
> URL: https://issues.apache.org/jira/browse/ACCUMULO-1709
> Project: Accumulo
> Issue Type: Bug
> Affects Versions: 1.4.4, 1.5.0
> Reporter: Steve Loughran
> Assignee: Steve Loughran
> Fix For: 1.5.1, 1.6.0
>
> Attachments: ACCUMULO-1709-001.patch
>
>
> If the master can't start up due to an exception, it logs it, but doesn't
> exit the process with any error code -so the failure isn't picked up by any
> scripts looking at the exit code of bin/accumulo
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira