HDFS-5710. FSDirectory#getFullPathName should check inodes against null. Contributed by Uma Maheswara Rao G.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1557803 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jing Zhao 2014-01-13 18:37:56 +00:00
parent 7c8b654ba5
commit e06ae2d567
2 changed files with 5 additions and 1 deletions

View File

@ -746,6 +746,9 @@ Release 2.4.0 - UNRELEASED
HDFS-5747. Fix NPEs in BlockManager. (Arpit Agarwal)
HDFS-5710. FSDirectory#getFullPathName should check inodes against null.
(Uma Maheswara Rao G via jing9)
BREAKDOWN OF HDFS-2832 SUBTASKS AND RELATED JIRAS
HDFS-4985. Add storage type to the protocol and expose it in block report

View File

@ -1842,7 +1842,8 @@ public class FSDirectory implements Closeable {
/** Return the full path name of the specified inode */
static String getFullPathName(INode inode) {
INode[] inodes = getFullPathINodes(inode);
return getFullPathName(inodes, inodes.length - 1);
// inodes can be null only when its called without holding lock
return inodes == null ? "" : getFullPathName(inodes, inodes.length - 1);
}
/**