Author: clamb Date: Mon Jul 7 09:51:49 2014 New Revision: 1608389 URL: http://svn.apache.org/r1608389 Log: HDFS-6629. Not able to create symlinks after HDFS-6516 (umamaheswararao)
Modified: hadoop/common/branches/fs-encryption/hadoop-hdfs-project/hadoop-hdfs/CHANGES-fs-encryption.txt hadoop/common/branches/fs-encryption/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java Modified: hadoop/common/branches/fs-encryption/hadoop-hdfs-project/hadoop-hdfs/CHANGES-fs-encryption.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/fs-encryption/hadoop-hdfs-project/hadoop-hdfs/CHANGES-fs-encryption.txt?rev=1608389&r1=1608388&r2=1608389&view=diff ============================================================================== --- hadoop/common/branches/fs-encryption/hadoop-hdfs-project/hadoop-hdfs/CHANGES-fs-encryption.txt (original) +++ hadoop/common/branches/fs-encryption/hadoop-hdfs-project/hadoop-hdfs/CHANGES-fs-encryption.txt Mon Jul 7 09:51:49 2014 @@ -37,6 +37,8 @@ fs-encryption (Unreleased) HDFS-6516. List of Encryption Zones should be based on inodes (clamb) + HDFS-6629. Not able to create symlinks after HDFS-6516 (umamaheswararao) + OPTIMIZATIONS BUG FIXES Modified: hadoop/common/branches/fs-encryption/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/fs-encryption/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java?rev=1608389&r1=1608388&r2=1608389&view=diff ============================================================================== --- hadoop/common/branches/fs-encryption/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java (original) +++ hadoop/common/branches/fs-encryption/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java Mon Jul 7 09:51:49 2014 @@ -2230,15 +2230,16 @@ public class FSDirectory implements Clos public final void addToInodeMap(INode inode) { if (inode instanceof INodeWithAdditionalFields) { inodeMap.put(inode); - 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())); + if (!inode.isSymlink()) { + 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())); + } } } }