Hadoop Common
  1. Hadoop Common
  2. HADOOP-9289

FsShell rm -f fails for non-matching globs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.23.0, 2.0.0-alpha, 3.0.0
    • Fix Version/s: 2.0.3-alpha, 0.23.7
    • Component/s: fs
    • Labels:
      None

      Description

      Rm -f isn't supposed to error for paths that don't exist. It works as expected for exact paths, but fails for non-matching globs.

      1. HADOOP-9289.patch
        3 kB
        Daryn Sharp
      2. HADOOP-9289.branch-23.patch
        3 kB
        Daryn Sharp

        Activity

        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12568254/HADOOP-9289.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/2159//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2159//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12568254/HADOOP-9289.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/2159//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2159//console This message is automatically generated.
        Hide
        Daryn Sharp added a comment -

        Replacing invalid 23 patch that accidentally included another patch. Only change from trunk patch is the import for an exception.

        This patch will of course fail pre-commit on trunk.

        Show
        Daryn Sharp added a comment - Replacing invalid 23 patch that accidentally included another patch. Only change from trunk patch is the import for an exception. This patch will of course fail pre-commit on trunk.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12568262/HADOOP-9289.branch-23.patch
        against trunk revision .

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2160//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12568262/HADOOP-9289.branch-23.patch against trunk revision . -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/2160//console This message is automatically generated.
        Hide
        Suresh Srinivas added a comment -

        Daryn, the docs need to be updated to indicate this behavior. For example man page on rm says:

             -f          Attempt to remove the files without prompting for confirmation, regardless of the file's permissions.  If the file does not exist, do not display a diagnostic message or modify the exit
                         status to reflect an error.  The -f option overrides any previous -i options.
        

        But this change can be done in a later patch.

        +1 for the patch.

        Show
        Suresh Srinivas added a comment - Daryn, the docs need to be updated to indicate this behavior. For example man page on rm says: -f Attempt to remove the files without prompting for confirmation, regardless of the file's permissions. If the file does not exist, do not display a diagnostic message or modify the exit status to reflect an error. The -f option overrides any previous -i options. But this change can be done in a later patch. +1 for the patch.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-trunk-Commit #3332 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3332/)
        HADOOP-9289. FsShell rm -f fails for non-matching globs. Contributed by Daryn Sharp. (Revision 1443108)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1443108
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Show
        Hudson added a comment - Integrated in Hadoop-trunk-Commit #3332 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3332/ ) HADOOP-9289 . FsShell rm -f fails for non-matching globs. Contributed by Daryn Sharp. (Revision 1443108) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1443108 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Hide
        Suresh Srinivas added a comment -

        I committed the patch to trunk. Will soon merge it to other branches.

        Show
        Suresh Srinivas added a comment - I committed the patch to trunk. Will soon merge it to other branches.
        Hide
        Suresh Srinivas added a comment -

        I committed the patch to trunk, branch-2, 2.0.3 and 0.23.

        Thank you Daryn!

        Show
        Suresh Srinivas added a comment - I committed the patch to trunk, branch-2, 2.0.3 and 0.23. Thank you Daryn!
        Hide
        Daryn Sharp added a comment -

        The FsShell rm usage states:

        -f     If the file does not exist, do not display a diagnostic
               message or modify the exit status to reflect an error.
        

        How do you think the text should be updated?

        Show
        Daryn Sharp added a comment - The FsShell rm usage states: -f If the file does not exist, do not display a diagnostic message or modify the exit status to reflect an error. How do you think the text should be updated?
        Hide
        Suresh Srinivas added a comment -

        I meant these options need to be added and the description needs to be added to user docs in hadoop-common/src/site/apt/FileSystemShell.apt.vm.

        Show
        Suresh Srinivas added a comment - I meant these options need to be added and the description needs to be added to user docs in hadoop-common/src/site/apt/FileSystemShell.apt.vm .
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Yarn-trunk #120 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/120/)
        HADOOP-9289. FsShell rm -f fails for non-matching globs. Contributed by Daryn Sharp. (Revision 1443108)

        Result = FAILURE
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1443108
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Show
        Hudson added a comment - Integrated in Hadoop-Yarn-trunk #120 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/120/ ) HADOOP-9289 . FsShell rm -f fails for non-matching globs. Contributed by Daryn Sharp. (Revision 1443108) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1443108 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #518 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/518/)
        HADOOP-9289. FsShell rm -f fails for non-matching globs. Contributed by Daryn Sharp. (Revision 1443155)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1443155
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #518 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/518/ ) HADOOP-9289 . FsShell rm -f fails for non-matching globs. Contributed by Daryn Sharp. (Revision 1443155) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1443155 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1309 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1309/)
        HADOOP-9289. FsShell rm -f fails for non-matching globs. Contributed by Daryn Sharp. (Revision 1443108)

        Result = FAILURE
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1443108
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1309 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1309/ ) HADOOP-9289 . FsShell rm -f fails for non-matching globs. Contributed by Daryn Sharp. (Revision 1443108) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1443108 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1337 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1337/)
        HADOOP-9289. FsShell rm -f fails for non-matching globs. Contributed by Daryn Sharp. (Revision 1443108)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1443108
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1337 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1337/ ) HADOOP-9289 . FsShell rm -f fails for non-matching globs. Contributed by Daryn Sharp. (Revision 1443108) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1443108 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Delete.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellReturnCode.java

          People

          • Assignee:
            Daryn Sharp
            Reporter:
            Daryn Sharp
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development