Community Articles

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

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>
33,792 Views
Comments
avatar
Rising Star

Hi,

Nice Article. I found a faster way of doing the same from Official documentation of sqoop.

https://oozie.apache.org/docs/4.1.0/DG_WorkflowReRun.html

So generally, rerunning the Oozie jobs are ad-hoc tasks and you may not want to create xml file just for re-running the job.

So command line argument goes as below:

oozie job -oozie http://localhost:11000/oozie -rerun 14-20090525161321-oozie-joe -Doozie.wf.rerun.skip.nodes=<>

Example for the same

oozie job -oozie http://localhost:11000/oozie -rerun 14-20090525161321-oozie-joe -Doozie.wf.rerun.skip.nodes=action1,action2,action3

where

http://localhost:11000/oozie --> host where Oozie is running

14-20090525161321-oozi-joe --> is your Oozie Job name

action1,action2,action3 --> are the steps that you want to skip.

It is eventually doing the same thing as mentioned in the article, but with this, we don't have to create the config file.

Cheers,

Sagar

avatar

How different is it from

oozie job -rerun <coord_Job_id> -action <aciton_id> [-nocleanup] [-refresh] -failed

Where cood_Job_id and aciton_id is for the workflow which has failed.

This works as charm for me.

avatar
New Contributor

Hi, Is there any way to rerun the job from Oozie console ?

avatar
Master Guru

@Harendra Sinha - No Oozie WebUI is readonly.

You can have a look at Workflow manager from Ambari which has great features to design/run/re-run oozie workflows.