hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r1373586 - /hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
Date Wed, 15 Aug 2012 19:18:23 GMT
Author: bobby
Date: Wed Aug 15 19:18:23 2012
New Revision: 1373586

URL: http://svn.apache.org/viewvc?rev=1373586&view=rev
Log:
svn merge -c 1373581 FIXES: HADOOP-8703. distcpV2: turn CRC checking off for 0 byte size (Dave
Thompson via bobby)

Modified:
    hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java

Modified: hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java?rev=1373586&r1=1373585&r2=1373586&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
(original)
+++ hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
Wed Aug 15 19:18:23 2012
@@ -91,7 +91,9 @@ public class RetriableFileCopyCommand ex
                                      context, fileAttributes);
 
       compareFileLengths(sourceFileStatus, tmpTargetPath, configuration, bytesRead);
-      compareCheckSums(sourceFS, sourceFileStatus.getPath(), targetFS, tmpTargetPath);
+      //At this point, src&dest lengths are same. if length==0, we skip checksum
+      if (bytesRead != 0) 
+          compareCheckSums(sourceFS, sourceFileStatus.getPath(), targetFS, tmpTargetPath);
       promoteTmpToTarget(tmpTargetPath, target, targetFS);
       return bytesRead;
 



Mime
View raw message