Details
-
Sub-task
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Right now the s3guard.LocalMetadataStore uses two HashMap in the implementation - one for the file and one for the dir hash.
/** Contains directories and files. */ private Cache<Path, PathMetadata> fileCache; /** Contains directory listings. */ private Cache<Path, DirListingMetadata> dirCache;
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:
static class LocalMetaEntry { @Nullable public PathMetadata pathMetadata; @Nullable public DirListingMetadata dirListingMetadata; }
or a Pair (tuple):
Pair<PathMetadata, DirListingMetadata> metaEntry;
And only one hash/cache for these elements.
Attachments
Attachments
Issue Links
- is related to
-
HADOOP-13649 s3guard: implement time-based (TTL) expiry for LocalMetadataStore
- Resolved