Issue Details (XML | Word | Printable)

Key: HADOOP-3489
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Lohit Vijayarenu
Reporter: Konstantin Shvachko
Votes: 0
Watchers: 0
Operations

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

NPE in SafeModeMonitor

Created: 04/Jun/08 10:32 PM   Updated: 08/Jul/09 04:43 PM
Return to search
Component/s: None
Affects Version/s: 0.18.0
Fix Version/s: 0.18.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works HADOOP-3489-1.patch 2008-06-06 09:40 PM Lohit Vijayarenu 0.5 kB

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


 Description  « Hide
If dfsadmin issues -safemode leave command when name-node is in the extended period of safe mode the SafeModeMonitor throws the following exception:
Exception in thread "org.apache.hadoop.dfs.FSNamesystem$SafeModeMonitor@dc86eb" java.lang.NullPointerException
	at org.apache.hadoop.dfs.FSNamesystem$SafeModeMonitor.run(FSNamesystem.java:3914)
	at java.lang.Thread.run(Thread.java:619)

The problem is that when SafeModeMonitor.run() wakes up it tries to check whether it canLeave() the safe mode, but the safe mode is off already,
and therefore the "safemode" field is null.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Lohit Vijayarenu added a comment - 06/Jun/08 09:40 PM
How about just checking if it is not null before trying canLeave?

Konstantin Shvachko added a comment - 06/Jun/08 10:11 PM
+1

Lohit Vijayarenu added a comment - 06/Jun/08 10:15 PM
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[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]
[exec] +1 javadoc. The javadoc tool did not generate any warning messages.
[exec]
[exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
[exec]

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