[
https://issues.apache.org/jira/browse/MAPREDUCE-5065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13602647#comment-13602647
]
Mithun Radhakrishnan commented on MAPREDUCE-5065:
-------------------------------------------------
Hello, Doug. Thank you for looking at this.
(For the moment, let's ignore that while DistCp code in 2.0/ does honour
-skipCrc, 0.23/ code does not. I'll update the 0.23 patch to bring both of
these to parity.)
IMO, it will not suffice to only document this in docs/code/warning-messages:
1. The user isn't likely to realize that the default block-sizes differ between
source and target. She is even less likely to perceive the difference if the
block-sizes on the source-files were explicitly set to a non-default value.
(And that's entirely possible with FileSystem.create().)
The most likely manner in which she'd notice is when DistCp fails on
checksum-diff, at which point the warning would instruct her to -skipCrc on the
rerun.
2. Using -skipCrc will disable checksum-checks on all files copied. It's
preferable to apply checks where we can, and skip only where block-sizes differ
(because that's a guaranteed failure.)
One alternative is to make -pb/-skipCrc default, but that's undesirable as well.
> DistCp should skip checksum comparisons if block-sizes are different on
> source/target.
> --------------------------------------------------------------------------------------
>
> Key: MAPREDUCE-5065
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-5065
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: distcp
> Affects Versions: 2.0.3-alpha, 0.23.5
> Reporter: Mithun Radhakrishnan
> Assignee: Mithun Radhakrishnan
> Attachments: MAPREDUCE-5065.branch23.patch,
> MAPREDUCE-5065.branch2.patch
>
>
> When copying files between 2 clusters with different default block-sizes, one
> sees that the copy fails with a checksum-mismatch, even though the files have
> identical contents.
> The reason is that on HDFS, a file's checksum is unfortunately a function of
> the block-size of the file. So you could have 2 different files with
> identical contents (but different block-sizes) have different checksums.
> (Thus, it's also possible for DistCp to fail to copy files on the same
> file-system, if the source-file's block-size differs from HDFS default, and
> -pb isn't used.)
> I propose that we skip checksum comparisons under the following conditions:
> 1. -skipCrc is specified.
> 2. File-size is 0 (in which case the call to the checksum-servlet is moot).
> 3. source.getBlockSize() != target.getBlockSize(), since the checksums are
> guaranteed to differ in this case.
> I have a patch for #3.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira