svn merge -c 1373581 FIXES: HADOOP-8703. distcpV2: turn CRC checking off for 0 byte size (Dave Thompson via bobby)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1373585 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Joseph Evans 2012-08-15 19:17:32 +00:00
parent e8eca906d4
commit 00712ab983
2 changed files with 6 additions and 1 deletions

View File

@ -721,6 +721,9 @@ Release 0.23.3 - UNRELEASED
HADOOP-8633. Interrupted FsShell copies may leave tmp files (Daryn Sharp HADOOP-8633. Interrupted FsShell copies may leave tmp files (Daryn Sharp
via tgraves) via tgraves)
HADOOP-8703. distcpV2: turn CRC checking off for 0 byte size (Dave
Thompson via bobby)
Release 0.23.2 - UNRELEASED Release 0.23.2 - UNRELEASED
NEW FEATURES NEW FEATURES

View File

@ -91,7 +91,9 @@ public class RetriableFileCopyCommand extends RetriableCommand {
context, fileAttributes); context, fileAttributes);
compareFileLengths(sourceFileStatus, tmpTargetPath, configuration, bytesRead); compareFileLengths(sourceFileStatus, tmpTargetPath, configuration, bytesRead);
compareCheckSums(sourceFS, sourceFileStatus.getPath(), targetFS, tmpTargetPath); //At this point, src&dest lengths are same. if length==0, we skip checksum
if (bytesRead != 0)
compareCheckSums(sourceFS, sourceFileStatus.getPath(), targetFS, tmpTargetPath);
promoteTmpToTarget(tmpTargetPath, target, targetFS); promoteTmpToTarget(tmpTargetPath, target, targetFS);
return bytesRead; return bytesRead;