hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hemanth Yamijala (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-2796) For script option hod should exit with distinguishable exit codes for script code and hod exit code.
Date Fri, 21 Mar 2008 07:13:24 GMT

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

Hemanth Yamijala updated HADOOP-2796:

    Attachment: 2796.patch

The proposed solution in the bug of adding a constant number to the script's exit code, in
retrospect, seems like a bad idea. 
- It is not very intuitive.
- There could be cases where because of the addition, some shells like bash which do modulo
256 on exit codes, could make the result become 0, which seems like a successful execution.
- It causes an unreasonable dependency between HOD and user scripts, who need to remember
this magic number.

The requirements for this problem, to my understanding, are as follows:

- Return a zero exit code for a completely successful operation (both hod and the script have
worked fine)
- Return a non-zero exit code for a failed operation (either hod or the script have failed).
Users may not care for more than this. Did it work or not
- In the event of a non-zero exit code where the user wants to know if his script failed,
provide an easy, clear way to determine if it failed.

On these lines, the attached patch does the following:

- Returns a zero exit code on success.
- Returns a non-zero exit code on failure of script or hod itself.
- If the script returned a non-zero exit code, it writes the exit code from the script to
a file 'script.exitcode' into the cluster directory. Users can simple check for this file's
existence and determine if it is a script failure.
- If it's a hod failure, no such file will exist.

> For script option hod should exit with distinguishable exit codes for script code and
hod exit code.
> ----------------------------------------------------------------------------------------------------
>                 Key: HADOOP-2796
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2796
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: contrib/hod
>    Affects Versions: 0.16.0
>            Reporter: Karam Singh
>            Assignee: Hemanth Yamijala
>             Fix For: 0.17.0
>         Attachments: 2796.patch
> For hod script option, the exit code should distinguishable between hod exit code and
script exit code.
> e.g.
> If script command contains the streaming command at end and that fails due to input path
not found, its value exit cod will 5 which overlaps with hod exit code 5 which means "job
execution failure"
> It would hod throws some distinguishable exit codes 
> e.g
> For above examples 64 +5 =69 and we should this to get exact exit code of hod script
command user should subtract 64 from exit code 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message