HADOOP-9388. TestFsShellCopy fails on Windows. Contributed by Ivan Mitic.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1455637 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ebf2e6b363
commit
6a9ccd809b
|
@ -479,6 +479,8 @@ Trunk (Unreleased)
|
|||
HADOOP-8973. DiskChecker cannot reliably detect an inaccessible disk on
|
||||
Windows with NTFS ACLs. (Chris Nauroth via suresh)
|
||||
|
||||
HADOOP-9388. TestFsShellCopy fails on Windows. (Ivan Mitic via suresh)
|
||||
|
||||
Release 2.0.5-beta - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
package org.apache.hadoop.fs.shell;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URI;
|
||||
|
@ -224,7 +223,13 @@ abstract class CommandWithDestination extends FsCommand {
|
|||
*/
|
||||
protected void copyFileToTarget(PathData src, PathData target) throws IOException {
|
||||
src.fs.setVerifyChecksum(verifyChecksum);
|
||||
copyStreamToTarget(src.fs.open(src.path), target);
|
||||
InputStream in = null;
|
||||
try {
|
||||
in = src.fs.open(src.path);
|
||||
copyStreamToTarget(in, target);
|
||||
} finally {
|
||||
IOUtils.closeStream(in);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue