Author: jing9 Date: Mon Jan 13 18:37:56 2014 New Revision: 1557803 URL: http://svn.apache.org/r1557803 Log: HDFS-5710. FSDirectory#getFullPathName should check inodes against null. Contributed by Uma Maheswara Rao G.
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1557803&r1=1557802&r2=1557803&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Mon Jan 13 18:37:56 2014 @@ -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 Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java?rev=1557803&r1=1557802&r2=1557803&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java Mon Jan 13 18:37:56 2014 @@ -1842,7 +1842,8 @@ public class FSDirectory implements Clos /** 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); } /**