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

Justin Joseph commented on HADOOP-7455:
---------------------------------------

Neutral state is the protocol which ensures that only one Active Namenode will 
be present at a time. The approach says 'Avoid the possibility of having two 
Active Namenodes; rather than do fencing later to prevent the inconsistencies 
that can be caused by two Active Namenodes'. This is the key to understand the 
intent behind neutral state.

The protocol demands that every decision to transition to a role or continue in 
the current role should be based on the connection maintained to the 
distributed coordinator, Zookeeper, with quorum size of 3 or more. 

The election of Active Namenode happens via the Leader Election recipe of 
Zookeeper. After the election, status quo is maintained till the Active 
Namenode goes down or the Namenode is unable to access the Zookeeper quorum. 
When Active Namenode is down, Standby will come to know about it through the 
watcher set on the Zookeeper & transitions to become Active.

Once the Namenode (active / standby) loses the connection to Zookeeper, it will 
relinquish it's current role & stays idle by transitioning to neutral state. 
Once the Zookeeper service is available again to the Namenode, it conducts the 
active instance election once again. Based on the result of the election it 
decides the new role.

This approach can ensure that there are no multiple Active Namenodes, even in 
the following scenarios
a) Active Namenode gets network partitioned and Standby Namenode transitions as 
Active.
b) Both Active & Standby Namenode are network partitioned
c) Zookeeper ensemble is network partitioned 


> Introduce HA Service Protocol Interface
> ---------------------------------------
>
>                 Key: HADOOP-7455
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7455
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: util
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: HA Branch (HDFS-1623)
>
>         Attachments: HADOOP-7455.1.patch, HADOOP-7455.2.patch, 
> HADOOP-7455.3.patch, HADOOP-7455.4.patch, HADOOP-7455.5.patch, HDFS-7454.patch
>
>
> This jira introduces a protocol interface to be implemented by services that 
> provide HA functionality.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to