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

Abhishek Bafna commented on OOZIE-2041:
---------------------------------------

By default {{PurgeService}} executes every hour to clean up old oozie 
workflows, coordinators and bundles from Oozie DB. With the new {{oozie admin 
-purge wf=1\;coord=2\;bundle=3\;limit=100\;oldCoordAction=true/false>}} 
command, users (admin users) can execute {{PurgeService}} on demand.

# Allow users to specify older than values for (workflow, coordinator and 
bundle) in {{days}}, limit and turn {{on/off}} for old coordinator actions. At 
least one parameter needs to be specified.
# If user does not specify one of parameter than {{PurgeService}} will use the 
default value of it from {{oozie-default.xml}} or {{oozie-site.xml}}.
# The execution of the Purge Command will require a lock for execution, so at 
the same time two {{PurgeXCommand}} will not execute. In the case, when lock is 
not acquired, it will queue the command.
# Currently purge command is implemented as blocking command. Users will need 
to wait until command execution completes.
# In the HA mode, purge command can be executed only on the leader Oozie server.
# purge command can be enabled/disabled using 
{{oozie.service.PurgeService.enable.command.line}} property. By default it is 
enabled.

> 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
>
> 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
(v6.3.4#6332)

Reply via email to