2020-05-15 18:18:31 +02:00
|
|
|
<workflow-app name="H2020Programme" xmlns="uri:oozie:workflow:0.5">
|
2020-05-15 18:18:01 +02:00
|
|
|
<parameters>
|
|
|
|
<property>
|
2020-05-15 18:18:31 +02:00
|
|
|
<name>projectFileURL</name>
|
|
|
|
<description>the url where to get the projects file</description>
|
2020-05-15 18:18:01 +02:00
|
|
|
</property>
|
|
|
|
|
|
|
|
<property>
|
2020-05-15 18:18:31 +02:00
|
|
|
<name>programmeFileURL</name>
|
|
|
|
<description>the url where to get the programme file</description>
|
2020-05-15 18:18:01 +02:00
|
|
|
</property>
|
|
|
|
|
2020-09-28 12:17:22 +02:00
|
|
|
<property>
|
|
|
|
<name>topicFileURL</name>
|
|
|
|
<description>the url where to get the topic file</description>
|
|
|
|
</property>
|
2020-05-15 18:18:01 +02:00
|
|
|
<property>
|
2020-05-15 18:18:31 +02:00
|
|
|
<name>outputPath</name>
|
|
|
|
<description>path where to store the action set</description>
|
2020-05-15 18:18:01 +02:00
|
|
|
</property>
|
|
|
|
</parameters>
|
|
|
|
|
2020-05-15 18:18:31 +02:00
|
|
|
<start to="deleteoutputpath"/>
|
2020-05-15 18:18:01 +02:00
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
2020-05-15 18:18:31 +02:00
|
|
|
<action name="deleteoutputpath">
|
2020-05-15 18:18:01 +02:00
|
|
|
<fs>
|
2020-05-15 18:18:31 +02:00
|
|
|
<delete path='${outputPath}'/>
|
|
|
|
<mkdir path='${outputPath}'/>
|
2020-05-28 10:04:36 +02:00
|
|
|
<delete path='${workingDir}'/>
|
|
|
|
<mkdir path='${workingDir}'/>
|
2020-05-15 18:18:01 +02:00
|
|
|
</fs>
|
2020-05-15 18:18:31 +02:00
|
|
|
<ok to="get_project_file"/>
|
2020-05-15 18:18:01 +02:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2020-05-15 18:18:31 +02:00
|
|
|
|
|
|
|
<action name="get_project_file">
|
2020-05-15 18:18:01 +02:00
|
|
|
<java>
|
2020-09-28 12:17:22 +02:00
|
|
|
<main-class>eu.dnetlib.dhp.actionmanager.project.utils.ReadCSV</main-class>
|
2020-05-15 18:18:31 +02:00
|
|
|
<arg>--hdfsNameNode</arg><arg>${nameNode}</arg>
|
2020-05-18 13:04:06 +02:00
|
|
|
<arg>--fileURL</arg><arg>${projectFileURL}</arg>
|
2020-05-19 18:44:25 +02:00
|
|
|
<arg>--hdfsPath</arg><arg>${workingDir}/projects</arg>
|
2020-09-28 12:17:22 +02:00
|
|
|
<arg>--classForName</arg><arg>eu.dnetlib.dhp.actionmanager.project.utils.CSVProject</arg>
|
2020-05-15 18:18:01 +02:00
|
|
|
</java>
|
2020-05-19 18:44:25 +02:00
|
|
|
<ok to="get_programme_file"/>
|
2020-05-15 18:18:01 +02:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-05-19 18:44:25 +02:00
|
|
|
<action name="get_programme_file">
|
2020-05-15 18:18:31 +02:00
|
|
|
<java>
|
2020-09-28 12:17:22 +02:00
|
|
|
<main-class>eu.dnetlib.dhp.actionmanager.project.utils.ReadCSV</main-class>
|
2020-05-15 18:18:31 +02:00
|
|
|
<arg>--hdfsNameNode</arg><arg>${nameNode}</arg>
|
2020-05-18 13:04:06 +02:00
|
|
|
<arg>--fileURL</arg><arg>${programmeFileURL}</arg>
|
2020-05-19 18:44:25 +02:00
|
|
|
<arg>--hdfsPath</arg><arg>${workingDir}/programme</arg>
|
2020-09-28 12:17:22 +02:00
|
|
|
<arg>--classForName</arg><arg>eu.dnetlib.dhp.actionmanager.project.utils.CSVProgramme</arg>
|
|
|
|
</java>
|
|
|
|
<ok to="get_topic_file"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="get_topic_file">
|
|
|
|
<java>
|
|
|
|
<main-class>eu.dnetlib.dhp.actionmanager.project.utils.ReadExcel</main-class>
|
|
|
|
<arg>--hdfsNameNode</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>--fileURL</arg><arg>${topicFileURL}</arg>
|
|
|
|
<arg>--hdfsPath</arg><arg>${workingDir}/topic</arg>
|
2021-05-20 14:53:53 +02:00
|
|
|
<arg>--sheetName</arg><arg>${sheetName}</arg>
|
2020-09-28 12:17:22 +02:00
|
|
|
<arg>--classForName</arg><arg>eu.dnetlib.dhp.actionmanager.project.utils.EXCELTopic</arg>
|
2020-05-15 18:18:31 +02:00
|
|
|
</java>
|
2020-05-28 17:30:09 +02:00
|
|
|
<ok to="read_projects"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="read_projects">
|
|
|
|
<java>
|
|
|
|
<main-class>eu.dnetlib.dhp.actionmanager.project.ReadProjectsFromDB</main-class>
|
|
|
|
<arg>--hdfsPath</arg><arg>${workingDir}/dbProjects</arg>
|
|
|
|
<arg>--hdfsNameNode</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>--postgresUrl</arg><arg>${postgresURL}</arg>
|
|
|
|
<arg>--postgresUser</arg><arg>${postgresUser}</arg>
|
|
|
|
<arg>--postgresPassword</arg><arg>${postgresPassword}</arg>
|
|
|
|
</java>
|
2020-05-19 18:44:25 +02:00
|
|
|
<ok to="prepare_programme"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="prepare_programme">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>PrepareProgramme</name>
|
|
|
|
<class>eu.dnetlib.dhp.actionmanager.project.PrepareProgramme</class>
|
|
|
|
<jar>dhp-aggregation-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-cores=${sparkExecutorCores}
|
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
|
|
--conf spark.sql.shuffle.partitions=3840
|
|
|
|
</spark-opts>
|
|
|
|
<arg>--programmePath</arg><arg>${workingDir}/programme</arg>
|
|
|
|
<arg>--outputPath</arg><arg>${workingDir}/preparedProgramme</arg>
|
|
|
|
</spark>
|
|
|
|
<ok to="prepare_project"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="prepare_project">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
2020-05-28 23:52:41 +02:00
|
|
|
<name>PrepareProjects</name>
|
2020-05-19 18:44:25 +02:00
|
|
|
<class>eu.dnetlib.dhp.actionmanager.project.PrepareProjects</class>
|
|
|
|
<jar>dhp-aggregation-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-cores=${sparkExecutorCores}
|
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
|
|
--conf spark.sql.shuffle.partitions=3840
|
|
|
|
</spark-opts>
|
|
|
|
<arg>--projectPath</arg><arg>${workingDir}/projects</arg>
|
|
|
|
<arg>--outputPath</arg><arg>${workingDir}/preparedProjects</arg>
|
2020-05-28 23:52:41 +02:00
|
|
|
<arg>--dbProjectPath</arg><arg>${workingDir}/dbProjects</arg>
|
2020-05-19 18:44:25 +02:00
|
|
|
</spark>
|
|
|
|
<ok to="create_updates"/>
|
2020-05-15 18:18:01 +02:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-05-19 18:44:25 +02:00
|
|
|
<action name="create_updates">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>ProjectProgrammeAS</name>
|
|
|
|
<class>eu.dnetlib.dhp.actionmanager.project.SparkAtomicActionJob</class>
|
|
|
|
<jar>dhp-aggregation-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-cores=${sparkExecutorCores}
|
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
|
|
--conf spark.sql.shuffle.partitions=3840
|
|
|
|
</spark-opts>
|
|
|
|
<arg>--projectPath</arg><arg>${workingDir}/preparedProjects</arg>
|
|
|
|
<arg>--programmePath</arg><arg>${workingDir}/preparedProgramme</arg>
|
2020-09-28 12:17:22 +02:00
|
|
|
<arg>--topicPath</arg><arg>${workingDir}/topic</arg>
|
2020-05-27 17:59:36 +02:00
|
|
|
<arg>--outputPath</arg><arg>${outputPath}</arg>
|
2020-05-19 18:44:25 +02:00
|
|
|
</spark>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2020-05-15 18:18:31 +02:00
|
|
|
|
2020-05-15 18:18:01 +02:00
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app>
|