[
https://issues.apache.org/jira/browse/HADOOP-13736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15616882#comment-15616882
]
Lei (Eddy) Xu commented on HADOOP-13736:
----------------------------------------
Hi, Chris
The purpose of this patch is that, making sure that in S3guard, all metadata
stores are actually {{MetadataStore<S3AFIleStatus>}} like:
{code}
class DynamoDBMetadataStore implements MetadataStore<S3AFileStatus> {
}
{code}
as I don't see Azure or other projects should use DynamoDB as metadata store.
Also it prevents the misuse like that (i.e., in some code path, people could
mistakenly pass in a raw {{FIleStatus()}}. And because of that, it removes all
unnecessary type checkings and down castings in {{DynamodDBMetadataStore}} and
within {{S3AFIleSystem}} itself. While it still makes {{PathMetadata}} and
{{MetadataStore}} interface re-usable for other interested parties (i.e.,
Azure). IMO, I prefer to use strong typing as much as possible :)
> Change PathMetadata to hold S3AFileStatus instead of FileStatus.
> ----------------------------------------------------------------
>
> Key: HADOOP-13736
> URL: https://issues.apache.org/jira/browse/HADOOP-13736
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Reporter: Lei (Eddy) Xu
> Assignee: Lei (Eddy) Xu
> Attachments: HADOOP-13736-HADOOP-13345.000.patch,
> HADOOP-13736.000.patch, HADOOP-13736.wip-01.patch
>
>
> {{S3AFileStatus}} is implemented differently with {{FileStatus}}, for
> instance {{S3AFileStatus#isEmptyDirectory()}} is not implemented in
> {{FileStatus()}}. And {{access_time}}, {{block_replication}}, {{owner}},
> {{group}} and a few other fields are not meaningful in {{S3AFileStatus}}.
> So in the scope of {{S3guard}}, it should use {{S3AFileStatus}} in instead
> of {{FileStatus}} in {{PathMetadaa}} to avoid casting the types back and
> forth in S3A.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]