[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

E. Sammer updated ZOOKEEPER-1080:
---------------------------------

    Attachment: zookeeper-leader-0.0.1.tar.gz

Attached an implementation of a leader election support library.

I think this is functionally correct, although still incomplete. Some 
suggestions made by coworkers who have reviewed this code:

* Rather than support fine grained events on state changes, keep closer track 
of state and provide higher level state transition callbacks (and include the 
previous state).
* Upon election, support creating a znode that indicates "ACK" of election and 
provide a configurable data payload.
* Write javadoc. ;)

This is currently written as a standalone maven project and depends on zk 3.3.1 
(latest I could find in mvn central). If others like this code, I'm happy to 
make the above improvements as well as any others.

> Provide a Leader Election framework based on Zookeeper receipe
> --------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1080
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1080
>             Project: ZooKeeper
>          Issue Type: New Feature
>          Components: contrib
>    Affects Versions: 3.3.2
>            Reporter: Hari A V
>         Attachments: LeaderElectionService.pdf, zookeeper-leader-0.0.1.tar.gz
>
>
> Currently Hadoop components such as NameNode and JobTracker are single point 
> of failure.
> If Namenode or JobTracker goes down, there service will not be available 
> until they are up and running again. If there was a Standby Namenode or 
> JobTracker available and ready to serve when Active nodes go down, we could 
> have reduced the service down time. Hadoop already provides a Standby 
> Namenode implementation which is not fully a "hot" Standby. 
> The common problem to be addressed in any such Active-Standby cluster is 
> Leader Election and Failure detection. This can be done using Zookeeper as 
> mentioned in the Zookeeper recipes.
> http://zookeeper.apache.org/doc/r3.3.3/recipes.html
> +Leader Election Service (LES)+
> Any Node who wants to participate in Leader Election can use this service. 
> They should start the service with required configurations. The service will 
> notify the nodes whether they should be started as Active or Standby mode. 
> Also they intimate any changes in the mode at runtime. All other complexities 
> can be handled internally by the LES.

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

        

Reply via email to