You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2016/08/19 18:11:20 UTC

[jira] [Commented] (HADOOP-13427) Eliminate needless uses of FileSystem.exists, isFile, isDirectory

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

Steve Loughran commented on HADOOP-13427:
-----------------------------------------

useful utility operations which would simplify code

# a FileUtils.deleteQuietly(fs, Path...) which deletes all listed paths and swallows exceptions
# a FileUtils.deleteOrFail(fs, Path...) which raises an exception if a delete fails and there is a file leftover

> Eliminate needless uses of FileSystem.exists, isFile, isDirectory 
> ------------------------------------------------------------------
>
>                 Key: HADOOP-13427
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13427
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>    Affects Versions: 2.8.0
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>            Priority: Minor
>         Attachments: HADOOP-13427-001.patch
>
>
> We're cleaning up Hive and Spark's use of FileSystem.exists, because it is often the case we see code of exists+open, exists+delete, when the exists probe is needless. Against object stores, expensive needless.
> Hadoop can set an example here by stripping them out. It will also show where there are opportunities to optimise things better and/or improve reporting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org