[ 
https://issues.apache.org/jira/browse/HADOOP-9626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Loughran updated HADOOP-9626:
-----------------------------------

    Attachment: HADOOP-9626-001.patch

This patch adds an interface to provide the exit code -but reworking the 
terminate() methods convinced me that while that is a useful interface, having 
a public {{terminate(ExitException()}} is the most useful -as then callers can 
build up their own exception and pass it down.

I have changed behaviour to only log the exit code if the status != 0. Indeed, 
we could crank that logging down to debug.

Having used the terminate operation in command line tools, the "exited with 
status 0" message is irritating and pointless. 
                
> 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