Can there be two oozie workflow.xml files in one directory?
If so how can I instruct oozie runner which one to run?
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
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