hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lqjack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-15423) Use single hash Path -> tuple(DirListingMetadata, PathMetadata) in LocalMetadataStore
Date Fri, 27 Apr 2018 18:03:00 GMT

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

lqjack commented on HADOOP-15423:
---------------------------------

[~gabor.bota] What about provide only one map 

private LruHashMap<Path, PathMetadataable> metaMap;

interface PathMetadataable {
    
      boolean pathMetadata();


      PathMetadata   pathInfo();


      DirListingMetadata dirInfo();
}

> Use single hash Path -> tuple(DirListingMetadata, PathMetadata) in LocalMetadataStore
> -------------------------------------------------------------------------------------
>
>                 Key: HADOOP-15423
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15423
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Gabor Bota
>            Assignee: Gabor Bota
>            Priority: Minor
>
> Right now the s3guard.LocalMetadataStore uses two HashMap in the implementation - one
for the file and one for the dir hash.
> {code:java}
>   /** Contains directories and files. */
>   private LruHashMap<Path, PathMetadata> fileHash;
>   /** Contains directory listings. */
>   private LruHashMap<Path, DirListingMetadata> dirHash;
> {code}
> It would be nice to have only one hash instead of these two for storing the values. An
idea for the implementation would be to have a class with nullable fields:
> {code:java}
>   static class LocalMetaEntry {
>     @Nullable
>     public PathMetadata pathMetadata;
>     @Nullable
>     public DirListingMetadata dirListingMetadata;
>   }
> {code}
> or a Pair (tuple):
> {code:java}
> Pair<PathMetadata, DirListingMetadata> metaEntry;
> {code}
> And only one hash/cache for these elements.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message