[ https://issues.apache.org/jira/browse/HDFS-6326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14001354#comment-14001354 ]
Tsz Wo Nicholas Sze commented on HDFS-6326: ------------------------------------------- > I can't think of a workaround to the problem of brittle Writable > serialization. ... We could check if the ACL bit is set in the permission field of FileStatus. I.e. {code} //FileStatus @Override public void write(DataOutput out) throws IOException { Text.writeString(out, getPath().toString(), Text.DEFAULT_MAX_LEN); out.writeLong(getLen()); out.writeBoolean(isDirectory()); out.writeShort(getReplication()); out.writeLong(getBlockSize()); out.writeLong(getModificationTime()); out.writeLong(getAccessTime()); getPermission().write(out); Text.writeString(out, getOwner(), Text.DEFAULT_MAX_LEN); Text.writeString(out, getGroup(), Text.DEFAULT_MAX_LEN); out.writeBoolean(isSymlink()); if (isSymlink()) { Text.writeString(out, getSymlink().toString(), Text.DEFAULT_MAX_LEN); } if (permission.getAclBit()) { //write ACL ... } } @Override public void readFields(DataInput in) throws IOException { String strPath = Text.readString(in, Text.DEFAULT_MAX_LEN); this.path = new Path(strPath); this.length = in.readLong(); this.isdir = in.readBoolean(); this.block_replication = in.readShort(); blocksize = in.readLong(); modification_time = in.readLong(); access_time = in.readLong(); permission.readFields(in); owner = Text.readString(in, Text.DEFAULT_MAX_LEN); group = Text.readString(in, Text.DEFAULT_MAX_LEN); if (in.readBoolean()) { this.symlink = new Path(Text.readString(in, Text.DEFAULT_MAX_LEN)); } else { this.symlink = null; } if (permission.getAclBit()) { //read ACL ... } } {code} > 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)