HDFS-6130. NPE when upgrading namenode from fsimages older than -32. Contributed by Haohui Mai.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1581713 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Haohui Mai 2014-03-26 07:30:20 +00:00
parent 1fbb04e367
commit b5935fab44
2 changed files with 5 additions and 0 deletions

View File

@ -697,6 +697,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)

View File

@ -522,6 +522,8 @@ private void loadFullNameINodes(long numFiles, DataInput in, Counter counter)
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);