0

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>

2 Answers2

1

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.

oozie.wf.rerun.failnodes=true 

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

 <start to = "Do_task2"/> 

and run the workflow again.

Archit Agarwal
  • 121
  • 1
  • 6
0

You can trigger that specific oozie action.

oozie job -oozie http://localhost:8080/oozie -rerun <FailedOrKilledWorkflowId> -action <actionName or actionId>
user1502721
  • 93
  • 1
  • 5