curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <>
Subject Re: Giving up leadership
Date Tue, 13 May 2014 15:50:53 GMT
LeaderLatch is one time use. Try LeaderSelector instead.


Date: May 13, 2014 at 10:46:46 AM
Subject:  Giving up leadership  

I am using the curator leadership recipe. So far is it working well, assigning leadership
as I expect. However I now want to round robin the leadership between all nodes in my leadership
election. I first tried doing this by closing the latch, waiting until the latch was in a
closed state, and calling the latch's start() method. This failed with an IllegalStateException
(cannot be started more than once.)

I am now going through the process of stopping the latch, and recreating it from scratch.
This seems like a lot of work. Is there a better way to get a node to give up leadership besides
this method?

View raw message