-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not know how to use election function. #432
Comments
@xiawang where you able to resolve the issue? I would appreciate if you could share your findings. |
@adityagujral I was not be able to solve the problem at the time (for my class project), so my partner and I wrote one on our own. |
I don't know if this is correct, but I did in this way:
and the function:
|
@mschirbel why you need to keep sequence False, as sequence number would be used to get smallest znode to elect leader. I created modified version of @mschirbel code and that wasn't working for me. I agree with @xiawang there is not much present how to use leader election recipe of kazoo for more than one node. My way of doing this (which didn't worked):
I created three files with differen znode name and tried to contest for election and my leader_election func ran for all three which is confusing and not clear of Leader election recipe of zookeeper. |
@mschirbel : improved you case to have practical cases for illustration
|
According to the given example in the document, I could not get election to work. I could not find any external code example as well. Could I get an example that shows at least 2 nodes in the election?
The only post on stackoverflow regarding this topic is:
http://stackoverflow.com/questions/39125064/how-to-use-kazoo-client-for-leader-election/40219590#40219590
However, this does not show anything new, and I do not know how this can be used for election with 2 or more nodes. There are no other git repositories containing code that use kazoo as well.
Many thanks.
The text was updated successfully, but these errors were encountered: