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:
parent
1ab5aa5279
commit
393baff732
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue