hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-13427) Eliminate needless uses of FileSystem.exists, isFile, isDirectory
Date Fri, 19 Aug 2016 17:55:23 GMT

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

Steve Loughran updated HADOOP-13427:
    Attachment: HADOOP-13427-001.patch

Patch 001

-replace exists calls with getFileStatus
-remove exists checks before delete, rename when not needed
-remove exists checks before mkdirs

There's a few places which raise IO exceptions on nonexistence where getFileStatus() raises
the FNFE exception anyway; I've retained those by having them generate the existing exception
& text, but now with the inner exception included. We could just get rid of the wrapping
entirely for cleaner code.

> 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
>         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

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

View raw message