浏览代码

HDFS-6130. Merge r1581713 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.4@1581715 13f79535-47bb-0310-9956-ffa450edef68
Haohui Mai 11 年之前
父节点
当前提交
1e4df35ed2

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -428,6 +428,9 @@ Release 2.4.0 - UNRELEASED
     HDFS-5840. Follow-up to HDFS-5138 to improve error handling during partial
     upgrade failures. (atm, jing9 and suresh via jing9)
 
+    HDFS-6130. NPE when upgrading namenode from fsimages older than -32.
+    (wheat9)
+
   BREAKDOWN OF HDFS-5698 SUBTASKS AND RELATED JIRAS
 
     HDFS-5717. Save FSImage header in protobuf. (Haohui Mai via jing9)

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java

@@ -523,6 +523,8 @@ public class FSImageFormat {
         updateRootAttr(newNode.asDirectory());
         continue;
       }
+
+      namesystem.dir.addToInodeMap(newNode);
       // check if the new inode belongs to the same parent
       if(!isParent(pathComponents, parentPath)) {
         parentINode = getParentINodeDirectory(pathComponents);