hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [2/3] hadoop git commit: HADOOP-13496. Include file lengths in Mismatch in length error for distcp. Contributed by Ted Yu
Date Thu, 19 Jan 2017 11:26:20 GMT
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/b2704702
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b2704702
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b2704702

Branch: refs/heads/branch-2
Commit: b2704702f9784034114c67d64800363d5e6378e4
Parents: c6c29d0
Author: Steve Loughran <stevel@apache.org>
Authored: Thu Jan 19 11:24:58 2017 +0000
Committer: Steve Loughran <stevel@apache.org>
Committed: Thu Jan 19 11:25:20 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/b2704702/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 ba2e0af..bed9162 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 = sourceFileStatus.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


Mime
View raw message