[ 
https://issues.apache.org/jira/browse/HBASE-7715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566088#comment-13566088
 ] 

Ted Yu commented on HBASE-7715:
-------------------------------

In hdfs 2.0, we have:
{code}
  /**
   * Enter, leave or get safe mode.
   * 
   * @param action
   *          One of SafeModeAction.ENTER, SafeModeAction.LEAVE and
   *          SafeModeAction.GET
   * @param isChecked
   *          If true check only for Active NNs status, else check first NN's
   *          status
   * @see 
org.apache.hadoop.hdfs.protocol.ClientProtocol#setSafeMode(SafeModeAction, 
boolean)
   */
  public boolean setSafeMode(HdfsConstants.SafeModeAction action,
      boolean isChecked) throws IOException {
{code}
I think we should pass true as the second parameter.

Thanks to Jing Zhao who mentioned the above method.
                
> FSUtils#waitOnSafeMode can incorrectly loop on standby NN
> ---------------------------------------------------------
>
>                 Key: HBASE-7715
>                 URL: https://issues.apache.org/jira/browse/HBASE-7715
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.4
>            Reporter: Andrew Wang
>
> We encountered an issue where HMaster failed to start with an active NN not 
> in safe mode and a standby NN in safemode. The relevant lines in 
> {{FSUtils.java}} show the issue:
> {noformat}
>     while 
> (dfs.setSafeMode(org.apache.hadoop.hdfs.protocol.FSConstants.SafeModeAction.SAFEMODE_GET))
>  {
> {noformat}
> This call skips the normal client failover from the standby to active NN, so 
> it will loop polling the standby NN if it unfortunately talks to the standby 
> first.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to