-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkflow.xml
141 lines (118 loc) · 4.84 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?xml version="1.0" encoding="UTF-8"?>
<workflow-app xmlns = "uri:oozie:workflow:0.2" name = "copy data from external to orc">
<start to = "customerSqoop" />
<!-- customer sqoop pull -->
<action name="customerSqoop">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare>
<delete path="${nameNode}/user/maria_dev/creditsystem1/customer"/>
</prepare>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<command>job --meta-connect jdbc:hsqldb:hsql://localhost:16000/sqoop --exec customerSqoop</command>
<archive>/user/oozie/share/lib/lib_20161025075203/sqoop/java-json.jar</archive>
</sqoop>
<ok to = "branchSqoop" />
<error to = "kill_job" />
</action>
<!-- branch sqoop pull -->
<action name="branchSqoop">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare>
<delete path="${nameNode}/user/maria_dev/creditsystem1/branch"/>
</prepare>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<command>job --meta-connect jdbc:hsqldb:hsql://localhost:16000/sqoop --exec branchSqoop</command>
<archive>/user/oozie/share/lib/lib_20161025075203/sqoop/java-json.jar</archive>
</sqoop>
<ok to = "creditcardSqoop" />
<error to = "kill_job" />
</action>
<!-- creditcard sqoop pull-->
<action name="creditcardSqoop">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare>
<delete path="${nameNode}/user/maria_dev/creditsystem1/creditcard"/>
</prepare>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<command>job --meta-connect jdbc:hsqldb:hsql://localhost:16000/sqoop --exec creditcardSqoop</command>
<archive>/user/oozie/share/lib/lib_20161025075203/sqoop/java-json.jar</archive>
</sqoop>
<ok to = "timetableSqoop" />
<error to = "kill_job" />
</action>
<!-- timetable sqoop pull -->
<action name="timetableSqoop">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare>
<delete path="${nameNode}/user/maria_dev/creditsystem1/timetable"/>
</prepare>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<command>job --meta-connect jdbc:hsqldb:hsql://localhost:16000/sqoop --exec timetableSqoop</command>
<archive>/user/oozie/share/lib/lib_20161025075203/sqoop/java-json.jar</archive>
</sqoop>
<ok to = "Create_External_Tables" />
<error to = "kill_job" />
</action>
<!-- Create External Tables for data-->
<action name = "Create_External_Tables">
<hive xmlns = "uri:oozie:hive-action:0.4">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<script>${nameNode}/user/maria_dev/creditsystem1/externaltables.hive</script>
</hive>
<ok to = "Create_Internal_Tables" />
<error to = "kill_job" />
</action>
<!-- Create internal Tables with partitions -->
<action name = "Create_Internal_Tables">
<hive xmlns = "uri:oozie:hive-action:0.4">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<script>${nameNode}/user/maria_dev/creditsystem1/internaltables.hive</script>
</hive>
<ok to = "Insert_into_Tables" />
<error to = "kill_job" />
</action>
<!-- insert into internal table -->
<action name = "Insert_into_Tables">
<hive xmlns = "uri:oozie:hive-action:0.4">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<script>${nameNode}/user/maria_dev/creditsystem1/Copydata.hql</script>
</hive>
<ok to = "end" />
<error to = "kill_job" />
</action>
<kill name = "kill_job">
<message>Job failed</message>
</kill>
<end name = "end" />
</workflow-app>