-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathworkflow.xml
70 lines (64 loc) · 2.11 KB
/
workflow.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<workflow-app name="example-workflow" xmlns="uri:oozie:workflow:0.2">
<start to="fork-node" />
<fork name="fork-node">
<path start="mr-wordcount" />
<path start="sub-wf-wordcount" />
<path start="ssh-hadoop-get" />
</fork>
<action name="ssh-hadoop-get">
<ssh xmlns="uri:oozie:ssh-action:0.1">
<host>airflow@localhost</host>
<command>hadoop</command>
<args>fs</args>
<args>-copyToLocal</args>
<args>${hdfsPath}</args>
<args>${localPath}</args>
</ssh>
<ok to="example-workflow-end" />
<error to="kill" />
</action>
<!-- Sub-workflow which runs two WordCount MapReduce jobs in parallel -->
<action name="sub-wf-wordcount">
<sub-workflow>
<app-path>namenode/todo/fix-this/example/sub-workflows
</app-path>
<propagate-configuration />
</sub-workflow>
<ok to="example-workflow-end" />
<error to="kill" />
</action>
<!-- WordCount MapReduce job -->
<action name="mr-wordcount">
<map-reduce>
<job-tracker>${jobTracker}</job-tracker>
<name-node>hdfs://nameNode</name-node>
<prepare>
<delete path="hdfs://nameNode/workflows/oozie-examples/data/output/wc0" />
</prepare>
<job-xml>conf/wordcount-mr-config.xml</job-xml>
<configuration>
<!-- If you need to do any custom setup before launching the MapReduce
action you can override the launcher by setting this property. -->
<!-- <property> <name>oozie.launcher.action.main.class</name> <value>com.cloudera.examples.oozie.action.CustomLauncher</value>
</property> -->
<property>
<name>mapred.input.dir</name>
<value>hdfs://nameNode/workflows/oozie-examples/data/*.txt
</value>
</property>
<property>
<name>mapred.output.dir</name>
<value>hdfs://nameNode/workflows/oozie-examples/data/output/wc0
</value>
</property>
</configuration>
</map-reduce>
<ok to="example-workflow-end" />
<error to="kill" />
</action>
<kill name="kill">
<message>Workflow failed with error message ${wf:errorMessage()}
</message>
</kill>
<end name="example-workflow-end" />
</workflow-app>