You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cd...@apache.org on 2009/04/22 22:07:48 UTC
svn commit: r767644 - in /hadoop/core/branches/branch-0.20: CHANGES.txt
src/tools/org/apache/hadoop/tools/DistCp.java
Author: cdouglas
Date: Wed Apr 22 20:07:47 2009
New Revision: 767644
URL: http://svn.apache.org/viewvc?rev=767644&view=rev
Log:
HADOOP-5671. Fix FNF exceptions when copying from old versions of HftpFileSystem. Contributed by Tsz Wo (Nicholas), SZE
Modified:
hadoop/core/branches/branch-0.20/CHANGES.txt
hadoop/core/branches/branch-0.20/src/tools/org/apache/hadoop/tools/DistCp.java
Modified: hadoop/core/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/CHANGES.txt?rev=767644&r1=767643&r2=767644&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Wed Apr 22 20:07:47 2009
@@ -888,7 +888,6 @@
HADOOP-5691. Makes org.apache.hadoop.mapreduce.Reducer concrete class
instead of abstract. (Amareshwari Sriramadasu via sharad)
-
Release 0.19.2 - Unreleased
BUG FIXES
@@ -965,6 +964,9 @@
HADOOP-5551. Prevent directory destruction on file create.
(Brian Bockelman via shv)
+ HADOOP-5671. Fix FNF exceptions when copying from old versions of
+ HftpFileSystem. (Tsz Wo (Nicholas), SZE via cdouglas)
+
Release 0.19.1 - 2009-02-23
IMPROVEMENTS
Modified: hadoop/core/branches/branch-0.20/src/tools/org/apache/hadoop/tools/DistCp.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/tools/org/apache/hadoop/tools/DistCp.java?rev=767644&r1=767643&r2=767644&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/tools/org/apache/hadoop/tools/DistCp.java (original)
+++ hadoop/core/branches/branch-0.20/src/tools/org/apache/hadoop/tools/DistCp.java Wed Apr 22 20:07:47 2009
@@ -1171,9 +1171,25 @@
return false;
}
+ //get src checksum
+ final FileChecksum srccs;
+ try {
+ srccs = srcfs.getFileChecksum(srcstatus.getPath());
+ } catch(FileNotFoundException fnfe) {
+ /*
+ * Two possible cases:
+ * (1) src existed once but was deleted between the time period that
+ * srcstatus was obtained and the try block above.
+ * (2) srcfs does not support file checksum and (incorrectly) throws
+ * FNFE, e.g. some previous versions of HftpFileSystem.
+ * For case (1), it is okay to return true since src was already deleted.
+ * For case (2), true should be returned.
+ */
+ return true;
+ }
+
//compare checksums
try {
- final FileChecksum srccs = srcfs.getFileChecksum(srcstatus.getPath());
final FileChecksum dstcs = dstfs.getFileChecksum(dststatus.getPath());
//return true if checksum is not supported
//(i.e. some of the checksums is null)