hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hairong Kuang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-6569) FsShell#cat should avoid calling unecessary getFileStatus before opening a file to read
Date Tue, 02 Mar 2010 19:49:27 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-6569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hairong Kuang updated HADOOP-6569:
----------------------------------

    Attachment: optimizeCat-yahoo2.patch

After much thinking back and forth, I eventually decided to change the DistributedFileSystem#open
as well. When the file to be open does not exist or is a directory, open throws a FileNotFoundException
instead of IOException. The error message is changed from "cannot open a file" to be "File
doesn't exist".

> FsShell#cat should avoid calling unecessary getFileStatus before opening a file to read
> ---------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6569
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6569
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.22.0
>
>         Attachments: optimizeCat-yahoo.patch, optimizeCat-yahoo1.patch, optimizeCat-yahoo2.patch,
optimizeCat.patch
>
>
> Since FileSystem#open throws a FileNotFoundException when the file to be read does not
exist, there is no need to check if the file is a directory or not before open. In case of
HDFS, this could reduce one getFileInfo RPC to NameNode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message