hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r1373581 - /hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
Date Wed, 15 Aug 2012 19:16:14 GMT
Author: bobby
Date: Wed Aug 15 19:16:13 2012
New Revision: 1373581

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

Modified:
    hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java

Modified: hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java?rev=1373581&r1=1373580&r2=1373581&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
(original)
+++ hadoop/common/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
Wed Aug 15 19:16:13 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