Hadoop Common
  1. Hadoop Common
  2. HADOOP-6701

Incorrect exit codes for "dfs -chown", "dfs -chgrp"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.19.1, 0.20.0, 0.20.1, 0.20.2
    • Fix Version/s: 0.20.3, 0.21.0
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Commands chmod, chown and chgrp now returns non zero exit code and an error message on failure instead of returning zero.
    • Tags:
      yahoo 20.10

      Description

      ravi@localhost:~$ hadoop dfs -chgrp abcd /; echo $?
      chgrp: changing ownership of
      'hdfs://localhost/':org.apache.hadoop.security.AccessControlException: Permission denied
      0

      ravi@localhost:~$ hadoop dfs -chown abcd /; echo $?
      chown: changing ownership of
      'hdfs://localhost/':org.apache.hadoop.security.AccessControlException: Permission denied
      0

      ravi@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.

      1. HADOOP-6701-trunk.patch
        11 kB
        Suresh Srinivas
      2. HADOOP-6701-trunk.patch
        11 kB
        Ravi Phulari
      3. HADOOP-6701-v20.patch
        11 kB
        Ravi Phulari

        Issue Links

          Activity

            People

            • Assignee:
              Ravi Phulari
              Reporter:
              Ravi Phulari
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development