浏览代码

commit e5b6eb9a8c98e4f5e103572239e537310d810fd7
Author: Hairong Kuang <hairong@ucdev21.inktomisearch.com>
Date: Fri Feb 26 22:44:30 2010 +0000

HADOOP:6569 from http://issues.apache.org/jira/secure/attachment/12437260/optimizeCat-yahoo.patch

+++ b/YAHOO-CHANGES.txt
+ HADOOP-6569. FsShell#cat should avoid calling unnecessary getFileStatus
+ before opening a file to read. (hairong)
+


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077232 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 年之前
父节点
当前提交
4fad9b2bb7
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      src/core/org/apache/hadoop/fs/FsShell.java

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

@@ -346,9 +346,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));