How to re-run failed action from oozie workflow
This articles explains about how to re-run only failed action for oozie workflow.
Below are the steps:
1. Find out the WF id of the failed/killed job.
2. Prepare a job config file which needs to be passed to the rerun command. To do so Follow below steps:
2.1 You first need the oozie job configuration xml file. The easiest way to do that is to use the -configcontent option of the oozie job command. E.g. On commandline
export OOZIE_URL="http://<oozie-host>:11000/oozie"
oozie job -configcontent <workflow-id> > job_conf.xml
2.2 Delete oozie.coord.application.path property from job_conf.xml. This is to avoid E0301: Invalid resource oozie rerun error.
2.3 Now add below property in job_conf.xml. This determines what actions need to be run in the workflow. If we specify specific action nodes here then it will skip those actions. if nothing specified then it will run all actions of the workflow.
To run all actions of a workflow:
<property>
<name>oozie.wf.rerun.skip.nodes</name>
<value>,</value>
</property>
To skip few actions of a workflow ( all the action nodes specified here will be skipped and the rest will be run 😞
<property>
<name>oozie.wf.rerun.skip.nodes</name>
<value>action-name1,action-name2,etc.</value>
</property>
3. Re-run wf with below command
oozie job -config "job_conf.xml" -rerun <wf-id>

