Robert Kanter commented on OOZIE-2041:

I haven't looked through the patch yet, but I think for HA, we shouldn't put 
the burden on the user to pick the current leader server because we don't 
currently disclose which server is the leader.  Even if they knew the leader 
address, they'd have to temporarily change their Oozie client from the load 
balancer address to the leader address, which is annoying.

I think we should do one of the following:
# Any Oozie Server can run the purge command when triggered from the CLI.  The 
{{PurgeXCommand}} should be acquiring a ZK-based lock, so that doesn't seem 
like it should be problematic.  The only reason we currently have only the 
leader run the recurring purge is so that we don't run it more often than 
# The Oozie Server receiving the call from the CLI will forward it to the 

I like option 1 better than option 2.

> Add an admin command to run the PurgeXCommand
> ---------------------------------------------
>                 Key: OOZIE-2041
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2041
>             Project: Oozie
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>            Assignee: Abhishek Bafna
>         Attachments: OOZIE-2041-00.patch, OOZIE-2041-01.patch, 
> OOZIE-2041-02.patch
> Some users may find it useful to be able to run the PurgeXCommand on-demand.  
> We can add a new admin command to run this.  e.g.
> {noformat}
> oozie admin -purge
> {noformat}
> With no args, it can use the "older than" values from oozie-site, but we 
> could have it take some arguments to override those for the command.
> Another thing to worry about is making sure that we don't run this if either 
> it's already running (i.e. the user sent it twice) or if the scheduled 
> PurgeService is already running it.  On top of that, we may need extra 
> consideration for HA setups where we currently only run it on the leader.  
> We should probably also have a to not schedule the PurgeService in ooize-site 
> for users who only want to run it manually.

This message was sent by Atlassian JIRA

Reply via email to