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

Steve Loughran commented on HDFS-4134:
--------------------------------------

Actually I now advocate a -2 error code for usage issues -independent of any 
other error message. 

why? Stops you having to grab the output and do a regexp search to verify that 
the error code is a usage message from the inner java code, not some failure of 
java or the shell script to get that far: {{if [[ ${usage} =~ *Usage* ]];}}
                
> hadoop namenode & namenode entry points should return -1 exit code on bad 
> arguments
> -----------------------------------------------------------------------------------
>
>                 Key: HDFS-4134
>                 URL: https://issues.apache.org/jira/browse/HDFS-4134
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 1.0.4
>            Reporter: Steve Loughran
>            Priority: Minor
>
> When you go  {{hadoop namenode start}} (or some other bad argument to the 
> namenode), a usage message is generated -but the script returns 0. 
> This stops it being a robust command to invoke from other scripts -and is 
> inconsistent with the JT & TT entry points, that do return -1 on a usage 
> message

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