Browse Source

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
Hairong Kuang 15 years ago
parent
commit
393baff732
2 changed files with 3 additions and 3 deletions
  1. 3 0
      CHANGES.txt
  2. 0 3
      src/java/org/apache/hadoop/fs/FsShell.java

+ 3 - 0
CHANGES.txt

@@ -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

+ 0 - 3
src/java/org/apache/hadoop/fs/FsShell.java

@@ -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));