[
https://issues.apache.org/jira/browse/HDFS-6984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15726802#comment-15726802
]
Andrew Wang commented on HDFS-6984:
-----------------------------------
Because I was curious, I re-read the history of the ACL bit over on HDFS-6326.
My paraphrased notes:
* There was a big effort to avoid exposing the ACL bit to callers of
FsPermission#toShort and #write and so on for compatibility reasons.
* Adding the full ACL to FileStatus was discarded for performance reasons.
* Adding a new bitfield is okay performance wise, but was discarded because it
breaks Writable compatibility.
The takeaways for me are that we should make a separate bitfield for these
flags. If we want to preserve cross-serialization, we'd need to also add this
field to HdfsFileStatus, and we'd always have to be careful with field numbers.
This entire saga has also made me eager to purge any remaining uses of Writable
from our API.
> In Hadoop 3, make FileStatus serialize itself via protobuf
> ----------------------------------------------------------
>
> Key: HDFS-6984
> URL: https://issues.apache.org/jira/browse/HDFS-6984
> Project: Hadoop HDFS
> Issue Type: Improvement
> Affects Versions: 3.0.0-alpha1
> Reporter: Colin P. McCabe
> Assignee: Colin P. McCabe
> Labels: BB2015-05-TBR
> Attachments: HDFS-6984.001.patch, HDFS-6984.002.patch,
> HDFS-6984.003.patch
>
>
> FileStatus was a Writable in Hadoop 2 and earlier. Originally, we used this
> to serialize it and send it over the wire. But in Hadoop 2 and later, we
> have the protobuf {{HdfsFileStatusProto}} which serves to serialize this
> information. The protobuf form is preferable, since it allows us to add new
> fields in a backwards-compatible way. Another issue is that already a lot of
> subclasses of FileStatus don't override the Writable methods of the
> superclass, breaking the interface contract that read(status.write) should be
> equal to the original status.
> In Hadoop 3, we should just make FileStatus serialize itself via protobuf so
> that we don't have to deal with these issues. It's probably too late to do
> this in Hadoop 2, since user code may be relying on the existing FileStatus
> serialization there.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]