[ https://issues.apache.org/jira/browse/HDFS-6629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14052927#comment-14052927 ]
Uma Maheswara Rao G commented on HDFS-6629: ------------------------------------------- I think, as Xattrs not supported on symlinks, we should have check on inode that if inode is not a symlink then only we should try dealing with xattrs as that inode might not have added with any crypto zone related xattr. {code} final XAttrFeature xaf = inode.getXAttrFeature(); if (xaf != null) { final List<XAttr> xattrs = xaf.getXAttrs(); for (XAttr xattr : xattrs) { final String xaName = XAttrHelper.getPrefixName(xattr); if (CRYPTO_XATTR_ENCRYPTION_ZONE.equals(xaName)) { encryptionZones.put(inode.getId(), new EncryptionZoneInt(new String(xattr.getValue()), inode.getId())); } } } {code} [~clamb], are you ok with this change? Please correct me if I did not follow it correctly. > Not able to create symlinks after HDFS-6516 > ------------------------------------------- > > Key: HDFS-6629 > URL: https://issues.apache.org/jira/browse/HDFS-6629 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: namenode > Reporter: Uma Maheswara Rao G > Assignee: Uma Maheswara Rao G > Fix For: fs-encryption (HADOOP-10150 and HDFS-6134) > > > {noformat} > java.lang.UnsupportedOperationException: XAttrs are not supported on symlinks > at > org.apache.hadoop.hdfs.server.namenode.INodeSymlink.getXAttrFeature(INodeSymlink.java:137) > at > org.apache.hadoop.hdfs.server.namenode.INode.getXAttrFeature(INode.java:192) > at > org.apache.hadoop.hdfs.server.namenode.FSDirectory.addToInodeMap(FSDirectory.java:2233) > at > org.apache.hadoop.hdfs.server.namenode.FSDirectory.addChild(FSDirectory.java:2137) > at > org.apache.hadoop.hdfs.server.namenode.FSDirectory.addLastINode(FSDirectory.java:2080) > at > org.apache.hadoop.hdfs.server.namenode.FSDirectory.addINode(FSDirectory.java:1900) > at > org.apache.hadoop.hdfs.server.namenode.FSDirectory.unprotectedAddSymlink(FSDirectory.java:2562) > at > org.apache.hadoop.hdfs.server.namenode.FSDirectory.addSymlink(FSDirectory.java:2550) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.addSymlink(FSNamesystem.java:4768) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.createSymlinkInt(FSNamesystem.java:2193) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.createSymlink(FSNamesystem.java:2153) > {noformat} > Noticed from fs-encryption jenkins. -- This message was sent by Atlassian JIRA (v6.2#6252)