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

Robert Kanter commented on OOZIE-1916:
--------------------------------------

I just tried that, but it caused some connection problems during the tests.  I 
don't think we need to worry about any future housekeeping before closing 
because ClosableUtils#closeQuietly takes a Closable as it's argument, so it 
can't do anything that a Closable doesn't support (i.e. they can't have it do 
any special ZK stuff).  If they need to do any extra stuff in a later release, 
they'd have to put it in LeaderLatch's close() method that gets called by being 
a Closable, in which case, our IOUtils#closeSafely will properly handle it.  So 
I'm inclined to leave it.

> Use Curator leader latch instead of checking the order of Oozie servers
> -----------------------------------------------------------------------
>
>                 Key: OOZIE-1916
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1916
>             Project: Oozie
>          Issue Type: Improvement
>          Components: HA
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>            Priority: Minor
>         Attachments: OOZIE-1916.patch
>
>
> We currently have a few tasks (e.g. Purging old jobs) that we only want to do 
> in one Oozie server.  We currently simply check which Oozie server is first 
> in ZooKeeper's list of servers (i.e. the order they connected).  We haven't 
> seen any problems with this, but it might be a good idea to replace this with 
> Curator's leader-latch, which sounds more robust.  
> The leader path should probably be something like "/services/leader".
> Make sure errors and edge cases are handled properly, including what happens 
> when the leader dies without unregistering, etc.
> http://curator.apache.org/curator-recipes/leader-latch.html



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to