diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 8fecc3bee07..ce0f8b0e0fd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -456,6 +456,8 @@ Release 2.7.0 - UNRELEASED using more than 1 DataNode and more than 2 storage locations per DataNode. (cnauroth) + HDFS-7637. Fix the check condition for reserved path. (Yi Liu via jing9) + Release 2.6.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java index 5f5b39a7b37..fdbbcf7aeea 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java @@ -1237,7 +1237,7 @@ public static boolean isReservedName(INode inode) { /** Check if a given path is reserved */ public static boolean isReservedName(String src) { - return src.startsWith(DOT_RESERVED_PATH_PREFIX); + return src.startsWith(DOT_RESERVED_PATH_PREFIX + Path.SEPARATOR); } static boolean isReservedRawName(String src) {