Hadoop Common
  1. Hadoop Common
  2. HADOOP-2192

dfs mv command differs from POSIX standards

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.15.1, 0.16.0
    • Fix Version/s: 0.17.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      this patch makes dfs -mv more like linux mv command getting rid of unnecessary output in dfs -mv and returns an error message when moving non existent files/directories --- mv: cannot stat "filename": No such file or directory.

      Description

      Assuming the dfs commands follow POSIX standards, there are some problems with the DFS mv command. I compared the DFS output with that of RHEL 4u5

      1. mv a file:
      Linux: No output
      DFS: Renamed /testarea/hadoop-site.xml to test

      2. mv a file/directory that does not exist. The DFS file does not exist, but the output says it renamed the file:
      Linux: mv: cannot stat `testarea/one': No such file or directory
      DFS: mv: Rename failed /testarea/one

      3. mv a directory to another directory:
      Linux: No output
      DFS: Renamed /testarea to testarea2

      1. Hadoop-2192_3.patch
        3 kB
        Mahadev konar
      2. Hadoop-2192_2.patch
        3 kB
        Mahadev konar
      3. Hadoop-2192_1.patch
        2 kB
        Mahadev konar

        Issue Links

          Activity

          Hide
          Mahadev konar added a comment -

          this patch fixes the issues stated in the bug.

          Show
          Mahadev konar added a comment - this patch fixes the issues stated in the bug.
          Hide
          Lohit Vijayarenu added a comment -

          Looks good. Could we also get this fixed

          Here build is dir and build.xml is file
          DFS Output
          [lohit@ hadoop-core-trunk]$ hadoop dfs -mv build build.xml
          mv: Rename failed /user/lohit/build

          LINUX output
          [lohit@ hadoop-core-trunk]$ mv build build.xml
          mv: cannot overwrite non-directory `build.xml' with directory `build'

          Show
          Lohit Vijayarenu added a comment - Looks good. Could we also get this fixed Here build is dir and build.xml is file DFS Output [lohit@ hadoop-core-trunk] $ hadoop dfs -mv build build.xml mv: Rename failed /user/lohit/build LINUX output [lohit@ hadoop-core-trunk] $ mv build build.xml mv: cannot overwrite non-directory `build.xml' with directory `build'
          Hide
          Mahadev konar added a comment -

          this patch addresses the issue pointed out by lohit...

          Show
          Mahadev konar added a comment - this patch addresses the issue pointed out by lohit...
          Hide
          Mahadev konar added a comment -

          changed catchign IOException to FileNotfoundexception in call to getfilestatus. thanks lohit.

          Show
          Mahadev konar added a comment - changed catchign IOException to FileNotfoundexception in call to getfilestatus. thanks lohit.
          Hide
          Lohit Vijayarenu added a comment -

          +1 looks good

          Show
          Lohit Vijayarenu added a comment - +1 looks good
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12375737/Hadoop-2192_3.patch
          against trunk revision 619744.

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

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

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

          javac +1. The applied patch does not generate any new javac compiler warnings.

          release audit +1. The applied patch does not generate any new release audit warnings.

          findbugs +1. The patch does not introduce any new Findbugs warnings.

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

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

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/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/12375737/Hadoop-2192_3.patch against trunk revision 619744. @author +1. The patch does not contain any @author tags. tests included +1. The patch appears to include 7 new or modified tests. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new javac compiler warnings. release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/console This message is automatically generated.
          Hide
          dhruba borthakur added a comment -

          I just committed this. Thanks Mahadev!

          Show
          dhruba borthakur added a comment - I just committed this. Thanks Mahadev!
          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-trunk #407 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/407/ )
          Hide
          Robert Chansler added a comment -

          Noted as incompatible in changes.txt

          Show
          Robert Chansler added a comment - Noted as incompatible in changes.txt

            People

            • Assignee:
              Mahadev konar
              Reporter:
              Mukund Madhugiri
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development