如何在Oozie中执行一项特定的工作流程操作。如果我手动杀死了Oozie工作流程?

时间:2019-01-30 17:36:59

标签: hadoop oozie oozie-coordinator oozie-workflow apache-crunch

我在Oozie工作流程下面,假设手动执行“ Do_task1”操作时杀死了该作业,但是尽管手动杀死了oozie作业(运行“ Do_task1”时),但我仍然想执行操作“ Do_task2”。我怎样才能做到这一点?

<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 个答案:

答案 0 :(得分:0)

一旦通过杀死第一个操作杀死了oozie工作流,除非在属性文件中将该属性设置为true,否则无法重新启动它。

perl

如果已配置此属性,则在执行命令后:

oozie作业-重新运行jobId

它将使用旧属性从“ Do_task1”而不是“ Do_task2”重新启动工作流程。

或者仅执行第二个动作的另一种方法是:set

oozie.wf.rerun.failnodes=true 

然后再次运行工作流程。

答案 1 :(得分:0)

您可以触发特定的oozie动作。

    public class 
  GroundGenerator : MonoBehaviour
  {
    public GameObject thePlatform;
    public Transform GenOnPoint;
    public float DistanceBetween;
    private float PlatformWidth;
public float DistanceBewtweenmin;
public float Di stanceBetweenmax;
  public ObjectPooler objectpool;
public GameObject[] thePlatforms;
   private int platformSelecter;

// Start is called before the first frame update
void Start()
{
    
}
// Update is called once per frame
void Update()
{
   
      
        

        GameObject newPlatform = objectpool.GetPooledObject();
        newPlatform.transform.position = transform.position;
        newPlatform.transform.rotation = transform.rotation;
    newPlatform.SetActive(true);
    

    
}
}