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

Eli Collins commented on HADOOP-9626:
-------------------------------------

Idea makes sense to me.

- If the idea is that all exceptions that get plumbed up to main have a method 
to get the status then it may make sense for the interface 
(ExceptionExitCodeSource) to live elsewhere since many such exceptions will not 
be exit exceptions.
- Why would the public terminate method ever be given an exception of type 
ExitException? ExitExceptions are always generated by ExitUtil by design so 
seems like that case should be an assert
- I'd make the LOG.info a warn (or error) given we're only logging now on the 
exit error path. Might make sense to keep the original log as a debug.
                
> Add an interface for any exception to serve up an Exit code
> -----------------------------------------------------------
>
>                 Key: HADOOP-9626
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9626
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: util
>    Affects Versions: 2.1.0-beta
>            Reporter: Steve Loughran
>            Priority: Minor
>         Attachments: HADOOP-9626-001.patch
>
>
> Various exception included exit codes, specifically 
> {{Shell.ExitCodeException}}, {{ExitUtils.ExitException()}}.
> If all exceptions that wanted to pass up an exit code to the main method 
> implemented an interface with the method {{int getExitCode()}}, it'd be 
> easier to extract exit codes from these methods in a unified way, so 
> generating the desired exit codes on the application itself

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

Reply via email to