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 "Mingliang Liu (JIRA)" <ji...@apache.org> on 2017/04/20 03:07:04 UTC

[jira] [Comment Edited] (HADOOP-14266) S3Guard: S3AFileSystem::listFiles() to employ MetadataStore

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

Mingliang Liu edited comment on HADOOP-14266 at 4/20/17 3:06 AM:
-----------------------------------------------------------------

Thanks [~fabbri] for reviewing and testing this.

{quote}
I also noticed a change in v7 patch to add FileStatusAcceptor checking for ProvidedFileStatusIterator.
{quote}
That's true we added the acceptor to the ProvidedFileStatusIterator along with the filter. This is needed because of its usage patterns:
# {{listFiles}}
## {{!recursive && isAuthoritative}}: should use acceptor to accept files only before returning to client
## Otherwise we provide the raw results from metadata store to {{FileStatusListingIterator}}
# {{listLocatedStatus}}
## {{!recursive}}: should use filter to accept paths before returning to client
## Otherwise we provide the raw results from metadata store to {{FileStatusListingIterator}}

{quote}
Looks like this was missing before? I'm curious if we should have a test case covering this?
{quote}
So, {{FileStatusListingIterator}} should check each result using both acceptor and filter (which it does in both v6 and v7 patch) to generate the internal {{filteredStatusList}}. This implies that the v6 logic is still good (except the isAuthoritative case) regarding the acceptor. And if it is not, the newly added tests should have failed: in the tests we create both subdirectories and files, where subdirectories will also have files.

I'll fix the javadoc in the next patch (or when committing).


was (Author: liuml07):
Thanks [~fabbri] for reviewing and testing this.

{quote}
I also noticed a change in v7 patch to add FileStatusAcceptor checking for ProvidedFileStatusIterator.
{quote}
That's true we added the acceptor to the ProvidedFileStatusIterator along with the filter. This is needed because of its usage patterns:
# {{listFiles}}
## {{!recursive && isAuthoritative}}: should use acceptor to accept files only before returning to client
## Otherwise we provide the raw results from metadata store to {{FileStatusListingIterator}}
# {{listLocatedStatus}}
## {{!recursive}}: should use filter to accept paths before returning to client
## Otherwise we provide the raw results from metadata store to {{FileStatusListingIterator}}

{quote}
Looks like this was missing before? I'm curious if we should have a test case covering this?
{quote}
So, {{FileStatusListingIterator}} should check each result using both acceptor and filter (which it does in both v6 and v7 patch) to generate the internal {{filteredStatusList}}. This implies that the v6 logic is still good (except the isAuthoritative case) regarding the acceptor. And it is not, the newly added tests should have failed: in the tests we create both subdirectories and files, where subdirectories will also have files.

I'll fix the javadoc in the next patch (or when committing).

> S3Guard: S3AFileSystem::listFiles() to employ MetadataStore
> -----------------------------------------------------------
>
>                 Key: HADOOP-14266
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14266
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: HADOOP-13345
>            Reporter: Mingliang Liu
>            Assignee: Mingliang Liu
>         Attachments: HADOOP-14266-HADOOP-13345.000.patch, HADOOP-14266-HADOOP-13345.001.patch, HADOOP-14266-HADOOP-13345.002.patch, HADOOP-14266-HADOOP-13345.003.patch, HADOOP-14266-HADOOP-13345.003.patch, HADOOP-14266-HADOOP-13345.004.patch, HADOOP-14266-HADOOP-13345-005.patch, HADOOP-14266-HADOOP-13345.005.patch, HADOOP-14266-HADOOP-13345.006.patch, HADOOP-14266-HADOOP-13345.007.patch
>
>
> Similar to [HADOOP-13926], this is to track the effort of employing MetadataStore in {{S3AFileSystem::listFiles()}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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