From 393baff732019f48ad7a38c5d7b7dea671aa81c9 Mon Sep 17 00:00:00 2001 From: Hairong Kuang Date: Wed, 3 Mar 2010 18:49:26 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 3 +++ src/java/org/apache/hadoop/fs/FsShell.java | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1571a82a9e..95e9a14e6a 100644 --- a/CHANGES.txt +++ b/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 diff --git a/src/java/org/apache/hadoop/fs/FsShell.java b/src/java/org/apache/hadoop/fs/FsShell.java index 8af692a1ef..91fc0b7a8f 100644 --- a/src/java/org/apache/hadoop/fs/FsShell.java +++ b/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));