hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r494253 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/FileUtil.java
Date Mon, 08 Jan 2007 23:30:06 GMT
Author: cutting
Date: Mon Jan  8 15:30:05 2007
New Revision: 494253

URL: http://svn.apache.org/viewvc?view=rev&rev=494253
Log:
HADOOP-866.  Fix 'dfs -get' command to remove existing crc files, if any.  Contributed by
Milind.

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

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=494253&r1=494252&r2=494253
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Jan  8 15:30:05 2007
@@ -17,6 +17,9 @@
  5. HADOOP-864.  Fix 'bin/hadoop -jar' to operate correctly when
     hadoop.tmp.dir does not yet exist.  (omalley via cutting)
 
+ 6. HADOOP-866.  Fix 'dfs -get' command to remove existing crc files,
+    if any.  (Milind Bhandarkar via cutting)
+
 
 Release 0.10.0 - 2007-01-05
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileUtil.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileUtil.java?view=diff&rev=494253&r1=494252&r2=494253
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileUtil.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/FileUtil.java Mon Jan  8 15:30:05 2007
@@ -98,7 +98,14 @@
         copyContent(in, out, conf);
       } finally {
         in.close();
-      } 
+      }
+      // if crc copying is disabled, remove the existing crc file if any
+      if (!copyCrc) {
+        Path crcFile = dstFS.getChecksumFile(dst);
+        if (dstFS.exists(crcFile)) {
+          dstFS.deleteRaw(crcFile);
+        }
+      }
     } else {
       throw new IOException(src.toString() + ": No such file or directory");
     }



Mime
View raw message