Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar
Super Guru

Question: Is it ok to run purge scripts on WF_JOBS & COORD_JOBS tables that are in oozie Database configured in MySQL? Will the purge scripts remove the running workflows and coordinators?

Below are the scripts we will be running to purge -

DELETE FROM WF_ACTIONS where WF_ID IN (SELECT ID from WF_JOBS where end_time < timestamp('2016-06-01 00:00:00')); DELETE from wf_jobs where end_time < timestamp('2016-06-01 00:00:00'); 

DELETE from COORD_ACTIONS where JOB_ID in (select ID from COORD_JOBS where END_TIME < timestamp('2016-06-01 00:00:00')); 

DELETE from coord_jobs where END_TIME < timestamp('2016-06-01 00:00:00'); 

Reply:

Oozie has feature to purge older jobs from database. by default it's 30 days. Actions related to long running coordinators do not purged until co-ordinator completes, ( example - if you have coordinator running for 6 months, then all the related workflows will be there in database for 6 months ) 

Will the purge scripts remove the running workflows and coordinators? 
--> No it will not. 

For Oozie purge scripts - 
I think this should be fine. As running coordinators/workflows wont be in DB with ENDTIME. Make sure you have backup oozie DB first and take 10-15 days gap before cleaning the DB 
771 Views
Comments
avatar
New Contributor

Post deleting WF_ACTIONS/wf_jobs and COORD_ACTIONS/coord_jobs do we need to ensure anything on BUNDLE_JOBS/bundle_jobs.

Any other steps to performed for removing stale/cache entries.

Irshad Ahmed