hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eli Collins (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6893) FileContext needs a method to test for existence of a file or directory.
Date Mon, 02 Aug 2010 18:56:16 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894650#action_12894650

Eli Collins commented on HADOOP-6893:

Hey Owen,

FileContext#exists was removed in HADOOP-6678. The motivation from Hairong was "in our production
clusters, we often see that the number of getFileStatus calls is multiple times of the open
calls. If we remove isFile, isDirectory, and exists from FileContext, users have to explicitly
call getFileStatus first, it is more likely that they will write more efficient code"

Adding AFS#exists that doesn't throw an exception seems reasonable, out of curiosity what's
the particular change you need this for?


> FileContext needs a method to test for existence of a file or directory.
> ------------------------------------------------------------------------
>                 Key: HADOOP-6893
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6893
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: fs
>            Reporter: Owen O'Malley
> FileContext is missing a method to ask if a file or directory exists. Currently the only
mechanism is to use getFileStatus, which throws an exception if the file doesn't exist, which
I don't think is an appropriate use of that method.

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

View raw message