hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r639369 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/FsShell.java src/test/org/apache/hadoop/dfs/TestDFSShell.java
Date Thu, 20 Mar 2008 17:18:07 GMT
Author: dhruba
Date: Thu Mar 20 10:18:07 2008
New Revision: 639369

URL: http://svn.apache.org/viewvc?rev=639369&view=rev
Log:
HADOOP-3012. dfs -mv file to user home directory throws exception if
the user home directory does not exist. (Mahadev Konar via dhruba)


Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/fs/FsShell.java
    hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestDFSShell.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=639369&r1=639368&r2=639369&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Mar 20 10:18:07 2008
@@ -319,6 +319,9 @@
     HADOOP-3025. ChecksumFileSystem supports the delete method with 
     the recursive flag. (Mahadev Konar via dhruba)
 
+    HADOOP-3012. dfs -mv file to user home directory throws exception if 
+    the user home directory does not exist. (Mahadev Konar via dhruba)
+
 Release 0.16.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/fs/FsShell.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/fs/FsShell.java?rev=639369&r1=639368&r2=639369&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/fs/FsShell.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/fs/FsShell.java Thu Mar 20 10:18:07 2008
@@ -855,7 +855,6 @@
         try {
           dstFstatus = dstFs.getFileStatus(dst);
         } catch(IOException e) {
-          //hide this
         }
         if((srcFstatus!= null) && (dstFstatus!= null)) {
           if (srcFstatus.isDir()  && !dstFstatus.isDir()) {
@@ -863,6 +862,7 @@
                 + dst + " with directory " + srcs[i]);
           }
         }
+        throw new IOException("Failed to rename " + srcs[i] + " to " + dst);
       }
     }
   }

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestDFSShell.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestDFSShell.java?rev=639369&r1=639368&r2=639369&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestDFSShell.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/dfs/TestDFSShell.java Thu Mar 20 10:18:07
2008
@@ -307,6 +307,13 @@
       argv = new String[3];
       argv[0] = "-mv";
       argv[1] = "/testfile";
+      argv[2] = "file";
+      ret = ToolRunner.run(shell, argv);
+      assertTrue("mv failed to rename", ret == -1);
+      out.reset();
+      argv = new String[3];
+      argv[0] = "-mv";
+      argv[1] = "/testfile";
       argv[2] = "/testfiletest";
       ret = ToolRunner.run(shell, argv);
       returned = out.toString();



Mime
View raw message