You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Lei (Eddy) Xu (JIRA)" <ji...@apache.org> on 2016/10/25 00:02:09 UTC

[jira] [Created] (HADOOP-13756) LocalMetadataStore#put(DirListingMetadata) should also put file metadata into fileHash.

Lei (Eddy) Xu created HADOOP-13756:
--------------------------------------

             Summary: 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
            Reporter: Lei (Eddy) Xu


{{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
(v6.3.4#6332)

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