You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by an...@apache.org on 2018/10/15 08:41:55 UTC
oozie git commit: OOZIE-3361 [docs] Document embedded XML job
submission mode (asalamon74 via andras.piros)
Repository: oozie
Updated Branches:
refs/heads/master 3adffcb87 -> 460372961
OOZIE-3361 [docs] Document embedded XML job submission mode (asalamon74 via andras.piros)
Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/46037296
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/46037296
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/46037296
Branch: refs/heads/master
Commit: 4603729611fb628cad18dc4f1fa7ba4b0443d990
Parents: 3adffcb
Author: Andras Piros <an...@cloudera.com>
Authored: Mon Oct 15 10:41:28 2018 +0200
Committer: Andras Piros <an...@cloudera.com>
Committed: Mon Oct 15 10:41:28 2018 +0200
----------------------------------------------------------------------
docs/src/site/markdown/WebServicesAPI.md | 88 +++++++++++++++++++++++++++
release-log.txt | 1 +
2 files changed, 89 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/oozie/blob/46037296/docs/src/site/markdown/WebServicesAPI.md
----------------------------------------------------------------------
diff --git a/docs/src/site/markdown/WebServicesAPI.md b/docs/src/site/markdown/WebServicesAPI.md
index a303802..7cf62e5 100644
--- a/docs/src/site/markdown/WebServicesAPI.md
+++ b/docs/src/site/markdown/WebServicesAPI.md
@@ -1044,6 +1044,94 @@ Content-Type: application/json;charset=UTF-8
}
```
+#### Embedded workflow XML Job Submission
+
+You can submit a workflow XML embedded into the XML configuration. This job submission mode
+makes it possible to submit a job using a single REST API call, instead of the separate workflow.xml
+upload and REST API call of the standard job submission mode.
+
+The following property is required:
+
+* `oozie.jobs.api.generated.xml`: The workflow XML. Note that the XML should
+be HTML escaped.
+
+**Request:**
+
+```
+POST /oozie/v1/jobs?action=start
+Content-Type: application/xml;charset=UTF-8
+.
+<configuration>
+ <property>
+ <name>resourceManager</name>
+ <value>localhost:8032</value>
+ </property>
+ <property>
+ <name>nameNode</name>
+ <value>hdfs://localhost:9000</value>
+ </property>
+ <property>
+ <name>queueName</name>
+ <value>default</value>
+ </property>
+ <property>
+ <name>user.name</name>
+ <value>testuser</value>
+ </property>
+ <property>
+ <name>oozie.jobs.api.generated.xml</name>
+ <value><workflow-app xmlns="uri:oozie:workflow:1.0" name="shell-wf">
+ <start to="shell-node"/>
+ <action name="shell-node">
+ <shell xmlns="uri:oozie:shell-action:1.0">
+ <resource-manager>${resourceManager}</resource-manager>
+ <name-node>${nameNode}</name-node>
+ <configuration>
+ <property>
+ <name>mapred.job.queue.name</name>
+ <value>${queueName}</value>
+ </property>
+ </configuration>
+ <exec>echo</exec>
+ <argument>my_output=Hello Oozie</argument>
+ <capture-output/>
+ </shell>
+ <ok to="check-output"/>
+ <error to="fail"/>
+ </action>
+ <decision name="check-output">
+ <switch>
+ <case to="end">
+ ${wf:actionData('shell-node')['my_output'] eq 'Hello Oozie'}
+ </case>
+ <default to="fail-output"/>
+ </switch>
+ </decision>
+ <kill name="fail">
+ <message>Shell action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
+ </kill>
+ <kill name="fail-output">
+ <message>Incorrect output, expected [Hello Oozie] but was [${wf:actionData('shell-node')['my_output']}]</message>
+ </kill>
+ <end name="end"/>
+</workflow-app>
+ </value>
+ </property>
+</configuration>
+```
+
+**Response:**
+
+```
+HTTP/1.1 201 CREATED
+Content-Type: application/json;charset="UTF-8"
+.
+{
+ id: "0000047-181005142721927-oozie-test-W"
+}
+```
+
+
#### Managing a Job
A HTTP PUT request starts, suspends, resumes, kills, update or dryruns a job.
http://git-wip-us.apache.org/repos/asf/oozie/blob/46037296/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 15aeb63..54cd1f3 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
-- Oozie 5.2.0 release (trunk - unreleased)
+OOZIE-3361 [docs] Document embedded XML job submission mode (asalamon74 via andras.piros)
OOZIE-3368 [fluent-job] CredentialsRetrying example does not compile (daniel.becker via andras.piros)
OOZIE-3277 [build] Check for star imports (kmarton via andras.piros)