[
https://issues.apache.org/jira/browse/HDFS-2747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185016#comment-13185016
]
Uma Maheswara Rao G commented on HDFS-2747:
-------------------------------------------
Here the reason for NullPoniterException is, initially when we are entering
into safemode, editLogStream will be null in FSEditlog because there is no log
segment started yet.
The reason for success of second time safemode entering is, The same synctxtid
already visited once with previous safemode trail. So it will assume that this
transaction was already flushed and will return. There won't be any exception
in logSyncAll call and will enter into safemode successfully again.
java.lang.NullPointerException
at
org.apache.hadoop.hdfs.server.namenode.FSEditLog.logSync(FSEditLog.java:524)
at
org.apache.hadoop.hdfs.server.namenode.FSEditLog.logSyncAll(FSEditLog.java:450)
at
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.enterSafeMode(FSNamesystem.java:3780)
at
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.setSafeMode(FSNamesystem.java:3648)
at
org.apache.hadoop.hdfs.server.namenode.FSImageTestUtil.enterSafemode(FSImageTestUtil.java:510)
> HA: entering safe mode after starting SBN can NPE
> -------------------------------------------------
>
> Key: HDFS-2747
> URL: https://issues.apache.org/jira/browse/HDFS-2747
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ha
> Affects Versions: HA branch (HDFS-1623)
> Reporter: Eli Collins
> Assignee: Uma Maheswara Rao G
>
> Entering Safemode on the primary after while it's already in safemode after
> the SBN is started results in an NPE:
> {noformat}
> hadoop-0.24.0-SNAPSHOT $ ./bin/hdfs dfsadmin -safemode get
> Safe mode is ON
> hadoop-0.24.0-SNAPSHOT $ ./bin/hdfs dfsadmin -safemode enter
> safemode: java.lang.NullPointerException
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira