[
https://issues.apache.org/jira/browse/HADOOP-13736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Nauroth updated HADOOP-13736:
-----------------------------------
Hadoop Flags: Reviewed
[~eddyxu], I think I understand your point now. With this in place, we'll
still have to downcast, but it will just be a single downcast to
{{MetadataStore<S3AFileStatus>}} done at initialization time. Then, all
subsequent operations can execute on {{S3AFileStatus}} instances without a
downcast.
This won't provide a strong type safety guarantee, because there is no way to
check the type parameter at runtime due to Java's type erasure. However, it's
still helpful for reducing the amount of boilerplate code spent on downcasts.
+1 for the patch, pending resolution of Aaron's requests to get other patches
committed first.
> 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-HADOOP-13345.001.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]