Hadoop - Oozie : check if existing oozie workflow is running

771 views Asked by At

I have oozie co-ordinator jobs which run at 11:00AM, 12:30PM,4:00PM, 7:00PM and 9:30PM. Workflow for these co-ordiinator jobs are same but they run at different times without specific frequency. If frequency is same I would have done it with one co-ordinator job.

My question is how do we know that co-ordinator job is still running and make other co-ordinator job to wait/sleep untill the existing one is running? Can we do it through oozie or need to write seperate oozie API/JavaScript or Shell script to check it?

Thanks, Asmath.

1

There are 1 answers

0
snies On

You could synchronize the execution of the workflows in the different coordinators by making use of the <input-events> tag of the coordinator.

For example you could create a directory like

/some/hdfs/dir/coordA-status/SUCCESS-2016-01-26 

at the end of every successful run of workflow A run by coordinator A.

Then you could make the existence of that directory a condition for coordinator B to run via the <dataset> and <input-events> tags.