1
|
<workflow-app name="usage-stats-export"
|
2
|
xmlns="uri:oozie:workflow:0.4">
|
3
|
<global>
|
4
|
<job-tracker>${jobTracker}</job-tracker>
|
5
|
<name-node>${nameNode}</name-node>
|
6
|
<configuration>
|
7
|
<property>
|
8
|
<name>mapred.job.queue.name</name>
|
9
|
<value>${queueName}</value>
|
10
|
</property>
|
11
|
<property>
|
12
|
<name>oozie.sqoop.log.level</name>
|
13
|
<value>DEBUG</value>
|
14
|
</property>
|
15
|
<property>
|
16
|
<name>oozie.launcher.mapred.job.priority</name>
|
17
|
<value>NORMAL</value>
|
18
|
</property>
|
19
|
<property>
|
20
|
<name>mapred.job.priority</name>
|
21
|
<value>NORMAL</value>
|
22
|
</property>
|
23
|
</configuration>
|
24
|
</global>
|
25
|
|
26
|
<start to="exportUsageStats"/>
|
27
|
|
28
|
<action name='exportUsageStats'>
|
29
|
<java>
|
30
|
<prepare>
|
31
|
<delete path="${nameNode}${piwik_logsPath}"/>
|
32
|
<mkdir path="${nameNode}${piwik_logsPath}"/>
|
33
|
<mkdir path="${nameNode}${portal_LogPath}"/>
|
34
|
<mkdir path="${nameNode}${repo_LogPath}"/>
|
35
|
<mkdir path="${nameNode}${lareferenciaLogPath}"/>
|
36
|
</prepare>
|
37
|
<configuration>
|
38
|
<property>
|
39
|
<name>mapred.job.queue.name</name>
|
40
|
<value>${queueName}</value>
|
41
|
</property>
|
42
|
|
43
|
<property>
|
44
|
<name>oozie.sqoop.log.level</name>
|
45
|
<value>DEBUG</value>
|
46
|
</property>
|
47
|
</configuration>
|
48
|
|
49
|
<main-class>eu.dnetlib.iis.core.java.ProcessWrapper</main-class>
|
50
|
<arg>-SworkingDir=${workingDir}</arg>
|
51
|
<arg>eu.dnetlib.iis.core.workflows.usage_stats.UsageStatsWrapper</arg>
|
52
|
<arg>-Ppiwik_username=${piwik_username}</arg>
|
53
|
<arg>-Ppiwik_pass=${piwik_pass}</arg>
|
54
|
<arg>-Ppiwik_httpProtocol=${piwik_httpProtocol}</arg>
|
55
|
<arg>-Ppiwik_url=${piwik_url}</arg>
|
56
|
<arg>-Ppiwik_siteId=${piwik_siteId}</arg>
|
57
|
<arg>-Ppiwik_startDate=${piwik_startDate}</arg>
|
58
|
<arg>-Ppiwik_finalDate=${piwik_finalDate}</arg>
|
59
|
<arg>-Ppiwik_logsPath=${piwik_logsPath}</arg>
|
60
|
<arg>-Ppiwik_filterOffset=${piwik_filterOffset}</arg>
|
61
|
<arg>-PStats_db_Url=${Stats_db_Url}</arg>
|
62
|
<arg>-PStats_db_User=${Stats_db_User}</arg>
|
63
|
<arg>-PStats_db_Pass=${Stats_db_Pass}</arg>
|
64
|
<arg>-PStats_db_Schema=${Stats_db_Schema}</arg>
|
65
|
<arg>-PStats_db_Driver=${Stats_db_Driver}</arg>
|
66
|
<arg>-Ptoken_auth=${token_auth}</arg>
|
67
|
<arg>-PCOUNTER_robots_Url=${COUNTER_robots_Url}</arg>
|
68
|
<arg>-PIRUS_UK_BaseUrl=${IRUS_UK_BaseUrl}</arg>
|
69
|
<arg>-Pmatomo_AuthToken=${matomo_AuthToken}</arg>
|
70
|
<arg>-Pmatomo_BaseUrl=${matomo_BaseUrl}</arg>
|
71
|
<arg>-Prepo_LogPath=${repo_LogPath}</arg>
|
72
|
<arg>-Pportal_LogPath=${portal_LogPath}</arg>
|
73
|
<arg>-Pportal_MatomoID=${portal_MatomoID}</arg>
|
74
|
<arg>-PLaReferenciaBaseUrl=${LaReferenciaBaseUrl}</arg>
|
75
|
<arg>-PLareferenciaAuthToken=${LareferenciaAuthToken}</arg>
|
76
|
<arg>-PlareferenciaLogPath=${lareferenciaLogPath}</arg>
|
77
|
|
78
|
</java>
|
79
|
|
80
|
<ok to="cleanUpHDFS"/>
|
81
|
<error to="fail"/>
|
82
|
</action>
|
83
|
<action name="cleanUpHDFS">
|
84
|
<fs>
|
85
|
<delete path="${nameNode}${piwik_logsPath}"/>
|
86
|
</fs>
|
87
|
<ok to="end"/>
|
88
|
<error to="fail"/>
|
89
|
</action>
|
90
|
<kill name="fail">
|
91
|
<message>
|
92
|
Unfortunately, the process failed -- error message: [${wf:errorMessage(wf:lastErrorNode())}]
|
93
|
</message>
|
94
|
</kill>
|
95
|
<end name="end"/>
|
96
|
</workflow-app>
|