HADOOP-6569. FsShell#cat should avoid calling unecessary getFileStatus before opening a file to read. Contributed by Hairong Kuang.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@918624 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hairong Kuang 2010-03-03 18:49:26 +00:00
parent 1ab5aa5279
commit 393baff732
2 changed files with 3 additions and 3 deletions

View File

@ -193,6 +193,9 @@ Trunk (unreleased changes)
HADOOP-6467. Improve the performance on HarFileSystem.listStatus(..).
(mahadev via szetszwo)
HADOOP-6569. FsShell#cat should avoid calling unecessary getFileStatus
before opening a file to read. (hairong)
BUG FIXES
HADOOP-6293. Fix FsShell -text to work on filesystems other than the

View File

@ -350,9 +350,6 @@ public class FsShell extends Configured implements Tool {
new DelayedExceptionThrowing() {
@Override
void process(Path p, FileSystem srcFs) throws IOException {
if (srcFs.getFileStatus(p).isDir()) {
throw new IOException("Source must be a file.");
}
printToStdout(srcFs.open(p));
}
}.globAndProcess(srcPattern, getSrcFileSystem(srcPattern, verifyChecksum));