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

Chris Nauroth commented on HDFS-6326:
-------------------------------------

bq. We could check if the ACL bit is set in the permission field of FileStatus.

This would work fine as an optimization, so that we don't need to serialize an 
empty list when there is no ACL.  However, it wouldn't fix the compatibility 
problem.  Suppose a 2.3.0 process attempts to deserialize a {{FileStatus}} that 
had been serialized by a 2.5.0 process.  The 2.5.0 process would write the ACL, 
but the 2.3.0 process wouldn't have the code to check the ACL bit and 
deserialize.  That would leave the input stream positioned at the incorrect 
location after completion of {{FileStatus#readFields}}.  The next read after 
that would have unpredictable results, possibly misinterpreting serialized ACL 
data as something else or possibly just throwing an exception.

> WebHdfs ACL compatibility is broken
> -----------------------------------
>
>                 Key: HDFS-6326
>                 URL: https://issues.apache.org/jira/browse/HDFS-6326
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 3.0.0, 2.4.0
>            Reporter: Daryn Sharp
>            Assignee: Chris Nauroth
>            Priority: Blocker
>             Fix For: 3.0.0, 2.4.1
>
>         Attachments: HDFS-6326-branch-2.4.patch, HDFS-6326.1.patch, 
> HDFS-6326.2.patch, HDFS-6326.3.patch, HDFS-6326.4.patch, HDFS-6326.5.patch, 
> HDFS-6326.6.patch, aclfsperm.example
>
>
> 2.4 ACL support is completely incompatible with <2.4 webhdfs servers.  The NN 
> throws an {{IllegalArgumentException}} exception.
> {code}
> hadoop fs -ls webhdfs://nn/
> Found 21 items
> ls: Invalid value for webhdfs parameter "op": No enum constant 
> org.apache.hadoop.hdfs.web.resources.GetOpParam.Op.GETACLSTATUS
> [... 20 more times...]
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to