Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Commit 7d657b5

Browse files
authoredJul 18, 2018
Merge pull request #1241 from NinjaLabib/smoke-test
Forked Smoke-Tests
2 parents a8ba59a + fa85ecc commit 7d657b5

File tree

2 files changed

+37
-20
lines changed

2 files changed

+37
-20
lines changed
 

‎cookbooks/smoke-tests/templates/default/smoke_test_job_properties.erb

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ queueName=default
77
mapTasks=10
88
reduceTasks=1
99
oozie.use.system.libpath=true
10-
queueName=default
1110
oozie.wf.application.path=<%= @smoke['hdfs_wf_path'] %>
1211
inputDir=inputForPi
1312
outputDir=outputForPi

‎cookbooks/smoke-tests/templates/default/smoke_test_xml.erb

+37-19
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,29 @@
6565
</property>
6666
</credential>
6767
</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+
6982
<action name="Shell-Action">
7083
<shell xmlns="uri:oozie:shell-action:0.1">
7184
<job-tracker>${jobTracker}</job-tracker>
7285
<name-node>${nameNode}</name-node>
7386
<exec>sleep</exec>
7487
<argument>10</argument>
7588
</shell>
76-
<ok to="MapReduce-Action"/>
77-
<error to="fail"/>
89+
<ok to="join-smokes"/>
90+
<error to="join-smokes"/>
7891
</action>
7992
<action name="MapReduce-Action">
8093
<map-reduce>
@@ -148,14 +161,10 @@
148161
</property>
149162
</configuration>
150163
</map-reduce>
151-
<ok to="forkNode"/>
152-
<error to="fail"/>
164+
<ok to="join-smokes"/>
165+
<error to="join-smokes"/>
153166
</action>
154-
<fork name="forkNode">
155-
<path start="Hive-Smokes"/>
156-
<path start="Hive2-Smokes"/>
157-
</fork>
158-
167+
159168
<action name="Hive-Smokes" cred="hcat_creds">
160169
<hive xmlns="uri:oozie:hive-action:0.2">
161170
<job-tracker>${jobTracker}</job-tracker>
@@ -171,8 +180,8 @@
171180
<param>HIVE_SMOKE_TEST_DB=smoke_test_db</param>
172181
<param>HIVE_SMOKE_TEST_TBL=smoke_test_tbl</param>
173182
</hive>
174-
<ok to="joiner"/>
175-
<error to="fail"/>
183+
<ok to="join-smokes"/>
184+
<error to="join-smokes"/>
176185
</action>
177186

178187
<action name="Hive2-Smokes" cred="hive2_creds">
@@ -191,10 +200,9 @@
191200
<param>HIVE_SMOKE_TEST_DB=smoke_test_db_v2</param>
192201
<param>HIVE_SMOKE_TEST_TBL=smoke_test_tbl_v2</param>
193202
</hive2>
194-
<ok to="joiner"/>
195-
<error to="fail"/>
203+
<ok to="join-smokes"/>
204+
<error to="join-smokes"/>
196205
</action>
197-
<join name="joiner" to="Hive-CLI"/>
198206

199207
<action name="Hive-CLI" cred="hcat_creds">
200208
<shell xmlns="uri:oozie:shell-action:0.1">
@@ -204,8 +212,8 @@
204212
<argument>-e</argument>
205213
<argument>"show databases"</argument>
206214
</shell>
207-
<ok to="HBASE-Shell"/>
208-
<error to="fail"/>
215+
<ok to="join-smokes"/>
216+
<error to="join-smokes"/>
209217
</action>
210218
<action name="HBASE-Shell" cred="hbase_creds">
211219
<shell xmlns="uri:oozie:shell-action:0.1">
@@ -218,9 +226,19 @@
218226
<argument>shell</argument>
219227
<argument>-n</argument>
220228
</shell>
221-
<ok to="report-success-zabbix"/>
222-
<error to="fail"/>
229+
<ok to="join-smokes"/>
230+
<error to="join-smokes"/>
223231
</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+
224242
<action name="report-success-zabbix">
225243
<shell xmlns="uri:oozie:shell-action:0.1">
226244
<job-tracker>${jobTracker}</job-tracker>

0 commit comments

Comments
 (0)
This repository has been archived.