[ https://issues.apache.org/jira/browse/HDFS-2894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200951#comment-13200951 ]
Eli Collins commented on HDFS-2894: ----------------------------------- The bug here is that in the HA branch we're now treating {{dfs.namenode.secondary.http-address}} like the other configs, eg expecting that it have both a nameservice and namenode prefix. The 2NN has a check to shutdown if HA is enabled but that check fails since DFSUtil#getSecondaryNameServiceId is used to determine the nameservice, and it can't determine the nameservice when the config is specified w/o a nameservice prefix, so it incorrectly thinks HA is not enabled. The 2NN should check if it thinks HA is enabled for the *NN*, not the 2NN, since the 2NN http-address config option is independent of HA (it might not be set at all). We also need to test that: # The 2NN fails to start if the {{dfs.namenode.secondary.http-address}} is undefined # Or specified with a nameservice prefix (but not namenode ID) # Or specified with a nameservice prefix and a namenode ID (incorrect config, user error) # getconf -secondarynamenode should work when {{dfs.namenode.secondary.http-address}} is specified either with or without a nameservice ID prefix Also, the 2NN should stop cleanly if HA is enabled, currently even if it shutdowns as intended then it will NPE in Daemon.java. > HA: disable 2NN when HA is enabled > ---------------------------------- > > Key: HDFS-2894 > URL: https://issues.apache.org/jira/browse/HDFS-2894 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: ha > Affects Versions: HA branch (HDFS-1623) > Reporter: Eli Collins > Assignee: Eli Collins > > The SecondaryNameNode should log a message and refuse to start if HA is > enabled since the StandbyNode checkpoints by default and IIRC we have not yet > enabled the ability to have multiple checkpointers in the NN. > On the HA branch the 2NN does not currently start from start-dfs.sh because > getconf -secondarynamenodes claims the http-address is not configured even > though it is, though this seems like a bug, in branch 23 getconf will > correctly return localhost:50090. > {noformat} > <property> > <name>dfs.namenode.secondary.http-address</name> > <value>localhost:50090</value> > </property> > </configuration> > hadoop-0.24.0-SNAPSHOT $ ./bin/hdfs getconf -secondarynamenodes > Incorrect configuration: secondary namenode address > dfs.namenode.secondary.http-address is not configured. > {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