hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dhruba borthakur (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HADOOP-554) hadoop dfs command line doesn't exit with status code on error
Date Thu, 19 Oct 2006 17:33:38 GMT
     [ http://issues.apache.org/jira/browse/HADOOP-554?page=all ]

dhruba borthakur reassigned HADOOP-554:
---------------------------------------

    Assignee: dhruba borthakur

> hadoop dfs command line doesn't exit with status code on error
> --------------------------------------------------------------
>
>                 Key: HADOOP-554
>                 URL: http://issues.apache.org/jira/browse/HADOOP-554
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Marco Nicosia
>         Assigned To: dhruba borthakur
>
> In DFSClient, the code looks like:
> ---- >8 ----
>         int exitCode = -1;
>         ...
>         try {
>             if ("-put".equals(cmd) || "-copyFromLocal".equals(cmd)) {
>                 copyFromLocal(new Path(argv[i++]), argv[i++]);
>             ...
>             exitCode = 0;;
>         } catch (IOException e ) {
>           System.err.println( cmd.substring(1) + ": " + e.getLocalizedMessage() );  
>         } finally {
>             fs.close();
>         }
>         return exitCode;
> ---- 8< ----
> Point 1: Few, if any of the functions called throw an exception. Instead they System.err.println
and return.
> Point 2: exitCode, regardless if there is an exception, is always 0.
> At minimum, it would be best if SOME status code were returned, so that any scripts calling
hadoop dfs would know to parse the output.
> At best, there'd be a well-documented table of exit codes so that parsing stderr wouldn't
be required.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message