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 st...@apache.org on 2017/01/19 11:26:21 UTC

[3/3] hadoop git commit: HADOOP-13496. Include file lengths in Mismatch in length error for distcp. Contributed by Ted Yu

HADOOP-13496. Include file lengths in Mismatch in length error for distcp. Contributed by Ted Yu

(cherry picked from commit 77401bd5fcca5127c9908156971eeec468371f47)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ed33ce11
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ed33ce11
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ed33ce11

Branch: refs/heads/trunk
Commit: ed33ce11dd8de36fb79e103d8491d077cd4aaf77
Parents: 1763467
Author: Steve Loughran <st...@apache.org>
Authored: Thu Jan 19 11:24:58 2017 +0000
Committer: Steve Loughran <st...@apache.org>
Committed: Thu Jan 19 11:25:40 2017 +0000

----------------------------------------------------------------------
 .../apache/hadoop/tools/mapred/RetriableFileCopyCommand.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ed33ce11/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/mapred/RetriableFileCopyCommand.java
----------------------------------------------------------------------
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 82b3b62..d1cdfdd 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
@@ -189,9 +189,10 @@ public class RetriableFileCopyCommand extends RetriableCommand {
                                   throws IOException {
     final Path sourcePath = source.getPath();
     FileSystem fs = sourcePath.getFileSystem(configuration);
-    if (fs.getFileStatus(sourcePath).getLen() != targetLen)
-      throw new IOException("Mismatch in length of source:" + sourcePath
-                + " and target:" + target);
+    long srcLen = fs.getFileStatus(sourcePath).getLen();
+    if (srcLen != targetLen)
+      throw new IOException("Mismatch in length of source:" + sourcePath + " (" + srcLen +
+          ") and target:" + target + " (" + targetLen + ")");
   }
 
   private void compareCheckSums(FileSystem sourceFS, Path source,


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