|
65 | 65 | </property>
|
66 | 66 | </credential>
|
67 | 67 | </credentials>
|
68 |
| - <start to="Shell-Action"/> |
| 68 | + |
| 69 | + <start to="Smoke-Test-Fork"/> |
| 70 | + |
| 71 | + <fork name="Smoke-Test-Fork"> |
| 72 | + <path start="Shell-Action"/> |
| 73 | + <path start="MapReduce-Action"/> |
| 74 | + <path start="Hive-Smokes"/> |
| 75 | + <path start="Hive2-Smokes"/> |
| 76 | + <path start="Hive-CLI"/> |
| 77 | + <path start="HBASE-Shell"/> |
| 78 | + </fork> |
| 79 | + |
| 80 | + |
| 81 | + |
69 | 82 | <action name="Shell-Action">
|
70 | 83 | <shell xmlns="uri:oozie:shell-action:0.1">
|
71 | 84 | <job-tracker>${jobTracker}</job-tracker>
|
72 | 85 | <name-node>${nameNode}</name-node>
|
73 | 86 | <exec>sleep</exec>
|
74 | 87 | <argument>10</argument>
|
75 | 88 | </shell>
|
76 |
| - <ok to="MapReduce-Action"/> |
77 |
| - <error to="fail"/> |
| 89 | + <ok to="join-smokes"/> |
| 90 | + <error to="join-smokes"/> |
78 | 91 | </action>
|
79 | 92 | <action name="MapReduce-Action">
|
80 | 93 | <map-reduce>
|
|
148 | 161 | </property>
|
149 | 162 | </configuration>
|
150 | 163 | </map-reduce>
|
151 |
| - <ok to="forkNode"/> |
152 |
| - <error to="fail"/> |
| 164 | + <ok to="join-smokes"/> |
| 165 | + <error to="join-smokes"/> |
153 | 166 | </action>
|
154 |
| - <fork name="forkNode"> |
155 |
| - <path start="Hive-Smokes"/> |
156 |
| - <path start="Hive2-Smokes"/> |
157 |
| - </fork> |
158 |
| - |
| 167 | + |
159 | 168 | <action name="Hive-Smokes" cred="hcat_creds">
|
160 | 169 | <hive xmlns="uri:oozie:hive-action:0.2">
|
161 | 170 | <job-tracker>${jobTracker}</job-tracker>
|
|
171 | 180 | <param>HIVE_SMOKE_TEST_DB=smoke_test_db</param>
|
172 | 181 | <param>HIVE_SMOKE_TEST_TBL=smoke_test_tbl</param>
|
173 | 182 | </hive>
|
174 |
| - <ok to="joiner"/> |
175 |
| - <error to="fail"/> |
| 183 | + <ok to="join-smokes"/> |
| 184 | + <error to="join-smokes"/> |
176 | 185 | </action>
|
177 | 186 |
|
178 | 187 | <action name="Hive2-Smokes" cred="hive2_creds">
|
|
191 | 200 | <param>HIVE_SMOKE_TEST_DB=smoke_test_db_v2</param>
|
192 | 201 | <param>HIVE_SMOKE_TEST_TBL=smoke_test_tbl_v2</param>
|
193 | 202 | </hive2>
|
194 |
| - <ok to="joiner"/> |
195 |
| - <error to="fail"/> |
| 203 | + <ok to="join-smokes"/> |
| 204 | + <error to="join-smokes"/> |
196 | 205 | </action>
|
197 |
| - <join name="joiner" to="Hive-CLI"/> |
198 | 206 |
|
199 | 207 | <action name="Hive-CLI" cred="hcat_creds">
|
200 | 208 | <shell xmlns="uri:oozie:shell-action:0.1">
|
|
204 | 212 | <argument>-e</argument>
|
205 | 213 | <argument>"show databases"</argument>
|
206 | 214 | </shell>
|
207 |
| - <ok to="HBASE-Shell"/> |
208 |
| - <error to="fail"/> |
| 215 | + <ok to="join-smokes"/> |
| 216 | + <error to="join-smokes"/> |
209 | 217 | </action>
|
210 | 218 | <action name="HBASE-Shell" cred="hbase_creds">
|
211 | 219 | <shell xmlns="uri:oozie:shell-action:0.1">
|
|
218 | 226 | <argument>shell</argument>
|
219 | 227 | <argument>-n</argument>
|
220 | 228 | </shell>
|
221 |
| - <ok to="report-success-zabbix"/> |
222 |
| - <error to="fail"/> |
| 229 | + <ok to="join-smokes"/> |
| 230 | + <error to="join-smokes"/> |
223 | 231 | </action>
|
| 232 | + <join name="join-smokes" to="status-decision"/> |
| 233 | + <decision name="status-decision"> |
| 234 | + <switch> |
| 235 | + <case to="report-success-zabbix"> |
| 236 | + ${wf:lastErrorNode() eq null} |
| 237 | + </case> |
| 238 | + <default to="fail"/> |
| 239 | + </switch> |
| 240 | + </decision> |
| 241 | + |
224 | 242 | <action name="report-success-zabbix">
|
225 | 243 | <shell xmlns="uri:oozie:shell-action:0.1">
|
226 | 244 | <job-tracker>${jobTracker}</job-tracker>
|
|
0 commit comments