[
https://issues.apache.org/jira/browse/HADOOP-6701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ravi Phulari updated HADOOP-6701:
---------------------------------
Attachment: HADOOP-6701.patch
Attaching patch to fix exit codes for {{fs -ch(own/mod/grp)}}. Patch includes
unit tests for theses issues.
This patch does not fix bug for incorrect exit code when wild card input is
given to the {{fs -ch(own/mod/grp)}}.
There is bug in {{FsShell.java}} which causes incorrect exit codes when
wildcard inputs are given to -ch* commands.
{code:title=Bar.java|borderStyle=solid}
for (int i=startIndex; i<args.length; i++) {
Path srcPath = new Path(args[i]);
FileSystem srcFs = srcPath.getFileSystem(getConf());
Path[] paths = FileUtil.stat2Paths(srcFs.globStatus(srcPath), srcPath);
for(Path path : paths) {
try {
{code}
I will open new Jira to fix this issue.
> Incorrect exit codes for "dfs -chown", "dfs -chgrp"
> ----------------------------------------------------
>
> Key: HADOOP-6701
> URL: https://issues.apache.org/jira/browse/HADOOP-6701
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.19.1, 0.20.0, 0.20.1, 0.20.2
> Reporter: Ravi Phulari
> Assignee: Ravi Phulari
> Priority: Minor
> Fix For: 0.20.3, 0.21.0, 0.22.0
>
> Attachments: HADOOP-6701.patch
>
>
> r...@localhost:~$ hadoop dfs -chgrp abcd /; echo $?
> chgrp: changing ownership of
> 'hdfs://localhost/':org.apache.hadoop.security.AccessControlException:
> Permission denied
> 0
> r...@localhost:~$ hadoop dfs -chown abcd /; echo $?
> chown: changing ownership of
> 'hdfs://localhost/':org.apache.hadoop.security.AccessControlException:
> Permission denied
> 0
> r...@localhost:~$ hadoop dfs -chmod 755 /DOESNTEXIST; echo $?
> chmod: could not get status for '/DOESNTEXIST': File does not exist:
> /DOESNTEXIST
> 0
> -
> Exit codes for both of the above invocations should be non-zero to indicate
> that the command failed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira