Hadoop Common
  1. Hadoop Common
  2. HADOOP-8176

Disambiguate the destination of FsShell copies

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.2, 0.24.0
    • Fix Version/s: 0.23.2
    • Component/s: fs
    • Labels:
      None

      Description

      The copy commands currently do not provide a way to disambiguate the expected destination of a copy. Ex.
      fs -put myfile path/mydir

      If "mydir" is an existing directory, then the copy produces path/mydir/file. If "mydir" does not exist at all, the copy produces path/mydir. The file has unexpectedly been renamed to what was expected to be a directory! It's standard unix shell behavior, but it lacks a special trait.

      Unix allows a user to disambiguate their intent by allowing path/mydir/ or path/mydir/. to mean "mydir" is always be treated as a directory. If the copy succeeds, it will always be called path/mydir/myfile.

        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/12518582/HADOOP-8176.patch
        against trunk revision .

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

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

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

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

        +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 .

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/717//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/717//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/12518582/HADOOP-8176.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +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 . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/717//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/717//console This message is automatically generated.
        Hide
        Robert Joseph Evans added a comment -

        Thanks Daryn. I looked over the patch and it looks good +1. I just put this into trunk, branch-0.23 and branch-0.23.2

        Show
        Robert Joseph Evans added a comment - Thanks Daryn. I looked over the patch and it looks good +1. I just put this into trunk, branch-0.23 and branch-0.23.2
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Commit #684 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/684/)
        svn merge -c 1301612 from trunk to branch-0.23 FIXES HADOOP-8176. Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301618)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301618
        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/CommandWithDestination.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Commit #684 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/684/ ) svn merge -c 1301612 from trunk to branch-0.23 FIXES HADOOP-8176 . Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301618) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301618 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/CommandWithDestination.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-0.23-Commit #693 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/693/)
        svn merge -c 1301612 from trunk to branch-0.23 FIXES HADOOP-8176. Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301618)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301618
        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/CommandWithDestination.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-0.23-Commit #693 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/693/ ) svn merge -c 1301612 from trunk to branch-0.23 FIXES HADOOP-8176 . Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301618) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301618 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/CommandWithDestination.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #1889 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1889/)
        HADOOP-8176. Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301612)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301612
        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/CommandWithDestination.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1889 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1889/ ) HADOOP-8176 . Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301612) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301612 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/CommandWithDestination.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #1963 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1963/)
        HADOOP-8176. Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301612)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301612
        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/CommandWithDestination.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1963 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1963/ ) HADOOP-8176 . Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301612) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301612 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/CommandWithDestination.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1897 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1897/)
        HADOOP-8176. Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301612)

        Result = ABORTED
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301612
        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/CommandWithDestination.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1897 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1897/ ) HADOOP-8176 . Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301612) Result = ABORTED bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301612 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/CommandWithDestination.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Commit #701 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/701/)
        svn merge -c 1301612 from trunk to branch-0.23 FIXES HADOOP-8176. Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301618)

        Result = ABORTED
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301618
        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/CommandWithDestination.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Commit #701 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/701/ ) svn merge -c 1301612 from trunk to branch-0.23 FIXES HADOOP-8176 . Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301618) Result = ABORTED bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301618 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/CommandWithDestination.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #987 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/987/)
        HADOOP-8176. Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301612)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301612
        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/CommandWithDestination.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #987 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/987/ ) HADOOP-8176 . Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301612) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301612 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/CommandWithDestination.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #200 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/200/)
        svn merge -c 1301612 from trunk to branch-0.23 FIXES HADOOP-8176. Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301618)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301618
        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/CommandWithDestination.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #200 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/200/ ) svn merge -c 1301612 from trunk to branch-0.23 FIXES HADOOP-8176 . Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301618) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301618 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/CommandWithDestination.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Build #228 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/228/)
        svn merge -c 1301612 from trunk to branch-0.23 FIXES HADOOP-8176. Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301618)

        Result = FAILURE
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301618
        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/CommandWithDestination.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Build #228 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/228/ ) svn merge -c 1301612 from trunk to branch-0.23 FIXES HADOOP-8176 . Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301618) Result = FAILURE bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301618 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/CommandWithDestination.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1022 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1022/)
        HADOOP-8176. Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301612)

        Result = SUCCESS
        bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301612
        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/CommandWithDestination.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1022 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1022/ ) HADOOP-8176 . Disambiguate the destination of FsShell copies (Daryn Sharp via bobby) (Revision 1301612) Result = SUCCESS bobby : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1301612 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/CommandWithDestination.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/PathData.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellCopy.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development