You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Ramesh Sekaran (JIRA)" <ji...@apache.org> on 2009/03/11 11:23:50 UTC
[jira] Created: (HADOOP-5461) Incorrect exit code from "hadoop dfs
-mv"
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.
[jira] Commented: (HADOOP-5461) Incorrect exit code from "hadoop
dfs -mv"
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ 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 commented on HADOOP-5461:
------------------------------------------------
{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.
[jira] Commented: (HADOOP-5461) Incorrect exit code from "hadoop
dfs -mv"
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681413#action_12681413 ]
Tsz Wo (Nicholas), SZE commented on HADOOP-5461:
------------------------------------------------
Ramesh, you are right. I can reproduce it with *
{noformat}
bash-3.2$ ./bin/hadoop dfs -mv '/user/a/*' b
bash-3.2$ echo $?
0
{noformat}
The problem also exists in trunk.
> 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.
[jira] Commented: (HADOOP-5461) Incorrect exit code from "hadoop
dfs -mv"
Posted by "Ramesh Sekaran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681594#action_12681594 ]
Ramesh Sekaran commented on HADOOP-5461:
----------------------------------------
Hi,
Thanks for the clarification. You are right, the source path (with *) should have been escaped.
Then, I would like to request that the exit code for such command be non-zero - to keep the behavior consistent with respect to invalid source directory.
thanks,
Ramesh
> 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.
[jira] Commented: (HADOOP-5461) Incorrect exit code from "hadoop
dfs -mv"
Posted by "Ramesh Sekaran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681158#action_12681158 ]
Ramesh Sekaran commented on HADOOP-5461:
----------------------------------------
Can you try with a "*" added to the <src>? The "mv" command is issued for files under a (non-existent) directory.
i.e. What is the behavior of this command?
./bin/hadoop dfs -mv /user/a/* b
The hadoop version that i encountered this behavior is
$ hadoop version
Hadoop 0.20.0-030909A
Subversion -r
Compiled by hadoopqa on Mon Mar 9 21:25:10 UTC 2009
> 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.
[jira] Issue Comment Edited: (HADOOP-5461) Incorrect exit code from
"hadoop dfs -mv"
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (HADOOP-5461) Incorrect exit code from "hadoop
dfs -mv"
Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-5461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680987#action_12680987 ]
Tsz Wo (Nicholas), SZE commented on HADOOP-5461:
------------------------------------------------
{quote}
$ hadoop dfs -mv /user/dfsload/does-not-exist/* /user/dfsload/.Trash
$ echo $?
0
{quote}
I guess the command did complete successfully since there is no error message like "No match" or "No such file or directory".
Tested -mv with 0.20. I cannot reproduce the problem reported.
{noformat}
bash-3.2$ ./bin/hadoop version
Hadoop 0.20.1-dev
Subversion https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.20 -r 751873
Compiled by tsz on Wed Mar 11 11:58:50 PDT 2009
bash-3.2$ ./bin/hadoop dfs -ls /user/
Found 1 items
drwxr-xr-x - tsz supergroup 0 2009-03-11 12:00 /user/tsz
bash-3.2$ ./bin/hadoop dfs -mv /user/a/ b
mv: /user/a: No such file or directory
bash-3.2$ echo $?
255
{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.