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:
Suresh Srinivas 2013-03-12 17:26:38 +00:00
parent ebf2e6b363
commit 6a9ccd809b
2 changed files with 9 additions and 2 deletions

View File

@ -478,6 +478,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

View File

@ -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);
}
}
/**