Description
When some dfs operations fail due to SnapshotAccessControlException, valid exit codes are not returned.
E.g:
-bash-4.1$ hadoop dfs -chmod -R 755 /user/foo/hdfs-snapshots/test0/.snapshot/s0 chmod: changing permissions of 'hdfs://<namenode>:8020/user/foo/hdfs-snapshots/test0/.snapshot/s0':org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotAccessControlException: Modification on read-only snapshot is disallowed -bash-4.1$ echo $? 0 -bash-4.1$ hadoop dfs -chown -R hdfs:users /user/foo/hdfs-snapshots/test0/.snapshot/s0 chown: changing ownership of 'hdfs://<namenode>:8020/user/foo/hdfs-snapshots/test0/.snapshot/s0':org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotAccessControlException: Modification on read-only snapshot is disallowed -bash-4.1$ echo $? 0
Similar problems exist for some other exceptions such as SafeModeException.
Attachments
Attachments
Issue Links
- is related to
-
HADOOP-9543 TestFsShellReturnCode may fail in branch-1
- Closed