[ 
https://issues.apache.org/jira/browse/ACCUMULO-1709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13804611#comment-13804611
 ] 

Steve Loughran commented on ACCUMULO-1709:
------------------------------------------

I've done something a bit like this, with an exception that [can provide an 
exit code 
|https://github.com/hortonworks/hoya/blob/develop/hoya-core/src/main/java/org/apache/hadoop/yarn/service/launcher/ServiceLaunchException.java]
 , [a list of 
exceptions|https://github.com/hortonworks/hoya/blob/develop/src/site/markdown/exitcodes.md],
 which hooks up somewhat to Hadoop's [ExitException and exit 
logic|https://github.com/apache/hadoop-common/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java].
 That code is intended to provide a single exit point that tests can downgrade 
to exceptions, but I'd like it improved, hence HADOOP-9626.

Key point: yes, it's nice for exceptions to serve up numbers, having some 
interface for this lets you retrofit it into exceptions where the base classes 
are not under your control. And a single exit method is good for logging, 
debugging and testing. 

but: with only 255 exceptions on a linux system, you are limited in what you 
can signal, which is a shame

> 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 was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to