Details
Description
Oozie import pig workflow OK with tag <argument> but skip <param> according to "Appendix A, Oozie XML-Schema"[1] <param> and <argument> are present since 0.2
test-pig.xml <workflow-app name="Pig" xmlns="uri:oozie:workflow:0.4"> <start to="Pig"/> <action name="Pig"> <pig> <job-tracker>${jobTracker}</job-tracker> <name-node>${nameNode}</name-node> <script>aggregate.pig</script> <param>KEY=VALUE</param> <argument>-param</argument> <argument>INPUT=/user/hue/oozie/workspaces/data</argument> <argument>-param</argument> <argument>OUTPUT=${output}</argument> </pig> <ok to="end"/> <error to="kill"/> </action> <kill name="kill"> <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message> </kill> <end name="end"/> </workflow-app>
[1] https://oozie.apache.org/docs/3.2.0-incubating/WorkflowFunctionalSpec.html#a3.2.3_Pig_Action "Appendix A, Oozie XML-Schema"
<workflow-app name="[WF-DEF-NAME]" xmlns="uri:oozie:workflow:0.2"> ... <action name="[NODE-NAME]"> <pig> <job-tracker>[JOB-TRACKER]</job-tracker> <name-node>[NAME-NODE]</name-node> <prepare> <delete path="[PATH]"/> ... <mkdir path="[PATH]"/> ... </prepare> <job-xml>[JOB-XML-FILE]</job-xml> <configuration> <property> <name>[PROPERTY-NAME]</name> <value>[PROPERTY-VALUE]</value> </property> ... </configuration> <script>[PIG-SCRIPT]</script> <param>[PARAM-VALUE]</param> ... <param>[PARAM-VALUE]</param> <argument>[ARGUMENT-VALUE]</argument> ... <argument>[ARGUMENT-VALUE]</argument> <file>[FILE-PATH]</file> ... <archive>[FILE-PATH]</archive> ... </pig> <ok to="[NODE-NAME]"/> <error to="[NODE-NAME]"/> </action> ... </workflow-app>
Oozie Schema Version 0.2 Oozie Schema Version 0.2.5 Oozie Schema Version 0.3 ... <xs:complexType name="PIG"> <xs:sequence> <xs:element name="job-tracker" type="xs:string" minOccurs="1" maxOccurs="1"/> <xs:element name="name-node" type="xs:string" minOccurs="1" maxOccurs="1"/> <xs:element name="prepare" type="workflow:PREPARE" minOccurs="0" maxOccurs="1"/> <xs:element name="job-xml" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="configuration" type="workflow:CONFIGURATION" minOccurs="0" maxOccurs="1"/> <xs:element name="script" type="xs:string" minOccurs="1" maxOccurs="1"/> <xs:element name="param" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="argument" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="file" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="archive" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> ...
Oozie Schema Version 0.1 ... <xs:complexType name="PIG"> <xs:sequence> <xs:element name="job-tracker" type="xs:string" minOccurs="1" maxOccurs="1"/> <xs:element name="name-node" type="xs:string" minOccurs="1" maxOccurs="1"/> <xs:element name="prepare" type="workflow:PREPARE" minOccurs="0" maxOccurs="1"/> <xs:element name="job-xml" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="configuration" type="workflow:CONFIGURATION" minOccurs="0" maxOccurs="1"/> <xs:element name="script" type="xs:string" minOccurs="1" maxOccurs="1"/> <xs:element name="param" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="file" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="archive" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> ...