Can there be two oozie workflow.xml files in one directory?

老子叫甜甜 提交于 2020-01-13 05:11:30

问题


Can there be two oozie workflow.xml files in one directory?

If so how can I instruct oozie runner which one to run?


回答1:


You can have two workflow files (just give them unique names), then you can select which one to call by setting the oozie.wf.application.path value in your config file:

oozie.wf.application.path=hdfs://namenode:9000/path/to/job/wf-1.xml
#oozie.wf.application.path=hdfs://namenode:9000/path/to/job/wf-2.xml



回答2:


Use 2 different directories.

But if you need to call the second workflow file as a sub-workflow just give it a different name. Here is how I call a sub workflow:

I have 2 files in a directory

workflow.xml
export.xml

And here is how my sub workflow is called from the main one:

<action name="export">
    <sub-workflow>
        <app-path>${export_application_path}</app-path>
        <propagate-configuration/>
        <configuration>
            <property>
                <name>exportDir</name>
                <value>${inputSqoop}</value>
            </property>
        </configuration>
    </sub-workflow>

    <ok to="cleanup"/>
    <error to="kill"/>
</action>

See the explanation in the docs: http://oozie.apache.org/docs/3.3.2/WorkflowFunctionalSpec.html#a3.2.6_Sub-workflow_Action



来源:https://stackoverflow.com/questions/20008745/can-there-be-two-oozie-workflow-xml-files-in-one-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!