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 aa...@apache.org on 2021/10/18 10:08:25 UTC

[hadoop] branch trunk updated: HADOOP-17932. Distcp file length comparison have no effect (#3519)

This is an automated email from the ASF dual-hosted git repository.

aajisaka pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 280ae1c  HADOOP-17932. Distcp file length comparison have no effect (#3519)
280ae1c is described below

commit 280ae1c0a9e156b832fb4e3ddd90faafa6477802
Author: adol001 <46...@qq.com>
AuthorDate: Mon Oct 18 18:07:53 2021 +0800

    HADOOP-17932. Distcp file length comparison have no effect (#3519)
    
    Signed-off-by: Akira Ajisaka <aa...@apache.org>
---
 .../java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
index e836ccc..544dbfb 100644
--- a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
+++ b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
@@ -154,7 +154,7 @@ public class RetriableFileCopyCommand extends RetriableCommand {
       if (!source.isSplit()) {
         DistCpUtils.compareFileLengthsAndChecksums(source.getLen(), sourceFS,
                 sourcePath, sourceChecksum, targetFS,
-                targetPath, skipCrc, source.getLen());
+                targetPath, skipCrc, offset + bytesRead);
       }
       // it's not append or direct write (preferred for s3a) case, thus we first
       // write to a temporary file, then rename it to the target path.

---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org