hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Fabbri (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13756) LocalMetadataStore#put(DirListingMetadata) should also put file metadata into fileHash.
Date Fri, 27 Apr 2018 01:43:00 GMT

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

Aaron Fabbri commented on HADOOP-13756:

+1.  You know it is a good patch when it is a one line fix and ~20 lines of test code. Thank
you [~gabor.bota]

Aside: Since wrote this code I've been thinking I should have probably used a single hash,
{{Path}} -> {{tuple(DirListingMetadata, PathMetadata)}} instead of two separate hashtables. 
We could do that as a separate Jira if we want.. Low priority though.

Testing now and will commit if everything works fine.

> LocalMetadataStore#put(DirListingMetadata) should also put file metadata into fileHash.
> ---------------------------------------------------------------------------------------
>                 Key: HADOOP-13756
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13756
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3, test
>    Affects Versions: 3.0.0-beta1
>            Reporter: Lei (Eddy) Xu
>            Assignee: Gabor Bota
>            Priority: Major
>         Attachments: HADOOP-13756.001.patch
> {{LocalMetadataStore#put(DirListingMetadata)}} only puts the metadata into {{dirHash}},
thus all {{FileStatus}} s are missing from {{LocalMedataStore#fileHash()}}, which makes it
confuse to use.
> So in the current way, to correctly put file status into the store (and also set {{authoriative}}
flag), you need to run  {code}
> List<PathMetadata> metas = new ArrayList<PathMetadata>();
> boolean authorizative = true;
> for (S3AFileStatus status : files) {
>    PathMetadata meta = new PathMetadata(status);
>    store.put(meta);
> }
> DirListingMetadata dirMeta = new DirMeta(parent, metas, authorizative);
> store.put(dirMeta);
> {code}
> Since solely calling {{store.put(dirMeta)}} is not correct, and calling {{store.put(dirMeta);}}
after putting all sub-file {{FileStatuss}} does the repetitive jobs. Can we just use a {{put(PathMetadata)}}
and a {{get/setAuthorative()}}   in the MetadataStore interface instead?

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