Issue Details (XML | Word | Printable)

Key: HADOOP-3509
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Tsz Wo (Nicholas), SZE
Reporter: Tsz Wo (Nicholas), SZE
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

FSNamesystem.close() throws NullPointerException

Created: 06/Jun/08 07:22 PM   Updated: 22/Aug/08 07:50 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.18.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works 3509_20080606.patch 2008-06-06 07:43 PM Tsz Wo (Nicholas), SZE 2 kB
Text File Licensed for inclusion in ASF works 3509_20080606b.patch 2008-06-06 10:47 PM Tsz Wo (Nicholas), SZE 3 kB
Text File Licensed for inclusion in ASF works 3509_20080606c.patch 2008-06-06 11:06 PM Tsz Wo (Nicholas), SZE 3 kB

Hadoop Flags: Reviewed
Resolution Date: 07/Jun/08 12:01 AM


 Description  « Hide
During NameNode startup, if there is an exception thrown before FSNamesystem.dir is created, we will get a NullPointerException.
2008-06-06 12:07:21,203 ERROR org.apache.hadoop.dfs.NameNode: java.lang.NullPointerException
	at org.apache.hadoop.dfs.FSNamesystem.close(FSNamesystem.java:465)
	at org.apache.hadoop.dfs.FSNamesystem.<init>(FSNamesystem.java:253)
	at org.apache.hadoop.dfs.NameNode.initialize(NameNode.java:148)
	at org.apache.hadoop.dfs.NameNode.<init>(NameNode.java:193)
	at org.apache.hadoop.dfs.NameNode.<init>(NameNode.java:179)
	at org.apache.hadoop.dfs.NameNode.createNameNode(NameNode.java:822)
	at org.apache.hadoop.dfs.NameNode.main(NameNode.java:831)


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Tsz Wo (Nicholas), SZE added a comment - 06/Jun/08 07:43 PM
3509_20080606.patch: check null before calling close(). I tested manually. No new tests added.

Tsz Wo (Nicholas), SZE added a comment - 06/Jun/08 10:47 PM
3509_20080606b.patch: added IOUtils.close(...)

Konstantin Shvachko added a comment - 06/Jun/08 11:04 PM
+1
This is good. I like IOUtils.close().

Tsz Wo (Nicholas), SZE added a comment - 06/Jun/08 11:06 PM
3509_20080606c.patch: updated javadoc

Tsz Wo (Nicholas), SZE added a comment - 06/Jun/08 11:28 PM
Passed ant test and ant test-patch locally.
     [exec]     +1 @author.  The patch does not contain any @author tags.

     [exec]     -1 tests included.  The patch doesn't appear to include any new or modified tests.
     [exec]                         Please justify why no tests are needed for this patch.

     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.

     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.

Konstantin Shvachko added a comment - 07/Jun/08 12:01 AM
I just committed this. Thank you Nicholas.