hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (HADOOP-5461) Incorrect exit code from "hadoop dfs -mv"
Date Thu, 12 Mar 2009 21:22:50 GMT

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

Tsz Wo (Nicholas), SZE edited comment on HADOOP-5461 at 3/12/09 2:21 PM:
-------------------------------------------------------------------------

{quote}
In hadoop 0.17 & 0.18 the behavior of "hadoop dfs -mv <invalid src dir>/* <target
dir>" is as shown below.

$ hadoop dfs -mv /user/dfsload/does-not-exist/* /user/dfsload/.Trash
hadoop: No match.
$ echo $?
1
{quote}
Ramesh, in the command above, * should be escaped.  Otherwise, bash will expend it.  The message
"hadoop: No match" was printed by bash but not hadoop.

I tested -mv with 0.18.  It also has the same behavior.  

{noformat}
bash-3.2$ ./bin/hadoop version
Hadoop 0.18.4-dev
Subversion https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.18 -r 752625
Compiled by tsz on Thu Mar 12 14:05:02 PDT 2009
bash-3.2$ ./bin/hadoop fs -ls /user        
Found 1 items
drwxr-xr-x   - tsz supergroup          0 2009-03-12 14:16 /user/tsz
bash-3.2$  ./bin/hadoop fs -mv /user/a/* b
./bin/hadoop: No match.
bash-3.2$ ./bin/hadoop fs -mv '/user/a/*' b
bash-3.2$ echo $?
0
{noformat}


      was (Author: szetszwo):
    {quote}
In hadoop 0.17 & 0.18 the behavior of "hadoop dfs -mv <invalid src dir>/* <target
dir>" is as shown below.

$ hadoop dfs -mv /user/dfsload/does-not-exist/* /user/dfsload/.Trash
hadoop: No match.
$ echo $?
1
{quote}
Ramesh, in the command above, * has not be escaped.  Otherwise, bash will expend it.  The
message "hadoop: No match" was printed by bash but not hadoop.

I tested -mv with 0.18.  It also has the same behavior.  

{noformat}
bash-3.2$ ./bin/hadoop version
Hadoop 0.18.4-dev
Subversion https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.18 -r 752625
Compiled by tsz on Thu Mar 12 14:05:02 PDT 2009
bash-3.2$ ./bin/hadoop fs -ls /user        
Found 1 items
drwxr-xr-x   - tsz supergroup          0 2009-03-12 14:16 /user/tsz
bash-3.2$  ./bin/hadoop fs -mv /user/a/* b
./bin/hadoop: No match.
bash-3.2$ ./bin/hadoop fs -mv '/user/a/*' b
bash-3.2$ echo $?
0
{noformat}

  
> Incorrect exit code from "hadoop dfs -mv"
> -----------------------------------------
>
>                 Key: HADOOP-5461
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5461
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.20.0
>            Reporter: Ramesh Sekaran
>            Priority: Minor
>
> In hadoop 0.17 & 0.18 the behavior of "hadoop dfs -mv <invalid src dir>/* <target
dir>" is as shown below.
> $  hadoop dfs -mv /user/dfsload/does-not-exist/* /user/dfsload/.Trash
> hadoop: No match.
> $ echo $?
> 1
> The same command when issued to hadoop 0.20 cluster, has a "0" exit code which is incorrect.
> $  hadoop dfs -mv /user/dfsload/does-not-exist/* /user/dfsload/.Trash
> $ echo $?
> 0
> The exit code must be non-zero in this case.

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


Mime
View raw message