hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kihwal Lee (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-10987) Provide an iterator-based listing API for FileSystem
Date Wed, 20 Aug 2014 18:12:27 GMT

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

Kihwal Lee updated HADOOP-10987:

    Attachment: HADOOP-10987.patch

The patch adds {{listStatusIterator()}} to {{FileSystem}} and implement it in {{DistributedFileSystem}}.

It also fixing incomplete symlink handling in {{listLocatedStatus()}}. It was discovered when
testing the patch by plugging in the iterator based method for all types of {{listStatus}}
methods. The old code only works when the last component of target path is a symlink. If a
link or reserved name appears in the middle, the method does not work.

The new {{listStatusIterator()}} method is covered in the basic fs test cases by removing
the fake wrapper in {{FileSystemTestWrapper}}. The chunked listing is tested in {{TestFileStatus}}.

> Provide an iterator-based listing API for FileSystem
> ----------------------------------------------------
>                 Key: HADOOP-10987
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10987
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Kihwal Lee
>         Attachments: HADOOP-10987.patch
> Iterator based listing methods already exist in {{FileContext}} for both simple listing
and listing with locations. However, {{FileSystem}} lacks the former.  From what I understand,
it wasn't added to {{FileSystem}} because it was believed to be phased out soon. Since {{FileSystem}}
is very well alive today and new features are getting added frequently, I propose adding an
iterator based {{listStatus}} method. As for the name of the new method, we can use the same
name used in {{FileContext}} : {{listStatusIterator()}}.
> It will be particularly useful when listing giant directories. Without this, the client
has to build up a huge data structure and hold it in memory. We've seen client JVMs running
out of memory because of this.
> Once this change is made, we can modify FsShell, etc. in followup jiras.

This message was sent by Atlassian JIRA

View raw message