hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r440879 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/FileSystem.java
Date Wed, 06 Sep 2006 21:32:13 GMT
Author: cutting
Date: Wed Sep  6 14:32:12 2006
New Revision: 440879

URL: http://svn.apache.org/viewvc?view=rev&rev=440879
Log:
HADOOP-320.  Fix so that checksum files are correctly copied when the destination of a file
copy is a directory.  Contributed by Hairong.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=440879&r1=440878&r2=440879
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Sep  6 14:32:12 2006
@@ -129,6 +129,10 @@
 32. HADOOP-507.  Fix an IllegalAccessException in DFS.
     (omalley via cutting)
 
+33. HADOOP-320.  Fix so that checksum files are correctly copied when
+    the destination of a file copy is a directory.
+    (Hairong Kuang via cutting)
+
 
 Release 0.5.0 - 2006-08-04
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java?view=diff&rev=440879&r1=440878&r2=440879
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileSystem.java Wed Sep  6 14:32:12
2006
@@ -388,10 +388,17 @@
       } else {
 
         boolean value = renameRaw(src, dst);
+        if (!value)
+          return false;
 
         Path checkFile = getChecksumFile(src);
-        if (exists(checkFile))
-          renameRaw(checkFile, getChecksumFile(dst)); // try to rename checksum
+        if (exists(checkFile)) { //try to rename checksum
+          if(isDirectory(dst)) {
+            renameRaw(checkFile, dst);
+          } else {
+            renameRaw(checkFile, getChecksumFile(dst)); 
+          }
+        }
 
         return value;
       }



Mime
View raw message