Author: hairong Date: Tue Oct 13 22:26:49 2009 New Revision: 824957 URL: http://svn.apache.org/viewvc?rev=824957&view=rev Log: HDFS-686. NullPointerException is thrown while merging edit log and image. Contributed by Hairong Kuang.
Modified: hadoop/common/branches/branch-0.20/CHANGES.txt hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Modified: hadoop/common/branches/branch-0.20/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/CHANGES.txt?rev=824957&r1=824956&r2=824957&view=diff ============================================================================== --- hadoop/common/branches/branch-0.20/CHANGES.txt (original) +++ hadoop/common/branches/branch-0.20/CHANGES.txt Tue Oct 13 22:26:49 2009 @@ -17,6 +17,9 @@ values of new configuration variables when deprecated variables are disabled. (Sreekanth Ramakrishnan via yhemanth) + HDFS-686. NullPointerException is thrown while merging edit log and image. + (hairong) + Release 0.20.1 - 2009-09-01 INCOMPATIBLE CHANGES Modified: hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=824957&r1=824956&r2=824957&view=diff ============================================================================== --- hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java (original) +++ hadoop/common/branches/branch-0.20/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Tue Oct 13 22:26:49 2009 @@ -759,7 +759,7 @@ if (length < 0) { throw new IOException("Negative length is not supported. File: " + src ); } - final LocatedBlocks ret = getBlockLocationsInternal(src, dir.getFileINode(src), + final LocatedBlocks ret = getBlockLocationsInternal(src, offset, length, Integer.MAX_VALUE, doAccessTime); if (auditLog.isInfoEnabled()) { logAuditEvent(UserGroupInformation.getCurrentUGI(), @@ -770,12 +770,12 @@ } private synchronized LocatedBlocks getBlockLocationsInternal(String src, - INodeFile inode, long offset, long length, int nrBlocksToReturn, boolean doAccessTime) throws IOException { + INodeFile inode = dir.getFileINode(src); if(inode == null) { return null; }