[
https://issues.apache.org/jira/browse/HADOOP-18723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17719588#comment-17719588
]
ASF GitHub Bot commented on HADOOP-18723:
-----------------------------------------
symious commented on code in PR #5603:
URL: https://github.com/apache/hadoop/pull/5603#discussion_r1185646826
##########
hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/DistCpUtils.java:
##########
@@ -596,6 +596,8 @@ public static CopyMapper.ChecksumComparison
checksumsAreEqual(
} else if (sourceChecksum.equals(targetChecksum)) {
return CopyMapper.ChecksumComparison.TRUE;
}
+ LOG.info("Checksum not equal. Source checksum: {}, target checksum: {}",
+ sourceChecksum, targetChecksum);
Review Comment:
In our failed jobs, the mismatch source and target path was printed by
https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/DistCpUtils.java#L633.
Thanks for pointing that out. The paths have also been added to DistCpUtils.
##########
hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/TestCopyCommitter.java:
##########
@@ -569,6 +572,7 @@ private void testCommitWithChecksumMismatch(boolean skipCrc)
fs, new Path(sourceBase + srcFilename), null,
fs, new Path(targetBase + srcFilename),
sourceCurrStatus.getLen()));
+ assertThat(log.getOutput(), containsString("Checksum not equal"));
Review Comment:
Copied the hamcrest version from
"org.apache.hadoop.conf.TestReconfiguration".
But changed to the Assertions.assertThat one.
> Add detail logs if distcp checksum mismatch
> -------------------------------------------
>
> Key: HADOOP-18723
> URL: https://issues.apache.org/jira/browse/HADOOP-18723
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Janus Chow
> Assignee: Janus Chow
> Priority: Major
> Labels: pull-request-available
>
> We encountered some errors of mismatch checksum during Distcp jobs. It took
> us some time to figure out that checksum type is different.
> Adding error logs shall help us to figure out such problems faster.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]