Browse Source

HADOOP-792. Fix 'dfs -mv' to return correct status. Contributed by Dhruba.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@486364 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 years ago
parent
commit
7269dc98ee
2 changed files with 4 additions and 1 deletions
  1. 3 0
      CHANGES.txt
  2. 1 1
      src/java/org/apache/hadoop/dfs/DFSShell.java

+ 3 - 0
CHANGES.txt

@@ -68,6 +68,9 @@ Trunk (unreleased changes)
 
 20. HADOOP-782.  Fully remove killed tasks.  (Arun C Murthy via cutting)
 
+21. HADOOP-792.  Fix 'dfs -mv' to return correct status.
+    (Dhruba Borthakur via cutting) 
+
 
 Release 0.9.1 - 2006-12-06
 

+ 1 - 1
src/java/org/apache/hadoop/dfs/DFSShell.java

@@ -359,7 +359,7 @@ public class DFSShell extends ToolBase {
         if (fs.rename(srcs[i], dst)) {
             System.out.println("Renamed " + srcs[i] + " to " + dstf);
         } else {
-            System.out.println("Rename failed " + srcs[i]);
+            throw new IOException("Rename failed " + srcs[i]);
         }
       }
     }