I have below Oozie workflow,Suppose manually I killed the job when action "Do_task1" was executing, but still I want to execute action "Do_task2" in spite of killing oozie job manually(when action "Do_task1" was running). How can I do that?
<workflow-app name="simple-Workflow"
xmlns="uri:oozie:workflow:0.4">
<start to = "Do_task1" />
<!—Step 1 -->
<action name = "Do_task1">
<hive xmlns = "uri:oozie:hive-action:0.4">
<job-tracker>xyz.com:8088</job-tracker>
<name-node>hdfs://rootname</name-node>
<script>hdfs_path_of_script/external.hive</script>
</hive>
<ok to = "Do_task2" />
<error to = "kill_job" />
</action>
<!—Step 2 -->
<action name = "Do_task2">
<hive xmlns = "uri:oozie:hive-action:0.4">
<job-tracker>xyz.com:8088</job-tracker>
<name-node>hdfs://rootname</name-node>
<script>hdfs_path_of_script/orc.hive</script>
</hive>
<ok to = "end" />
<error to = "kill_job" />
</action>
<kill name = "kill_job">
<message>Job failed</message>
</kill>
<end name = "end" />
</workflow-app>
Once the oozie workflow is killed by killing the first action, it can not be restarted unless this property is set to true in the properties file.
If you have configured this property , after executing the command:
oozie job -rerun jobId
It will restart the workflow from "Do_task1" and not "Do_task2" with old properties.
Or another way to execute only the second action is : set
and run the workflow again.