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/trunk@1373581 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4e09b481e7
commit
6167123bcb
@ -902,6 +902,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
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -91,7 +91,9 @@ private long doCopy(FileStatus sourceFileStatus, Path target,
|
|||||||
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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user