329 lines
15 KiB
XML
329 lines
15 KiB
XML
<workflow-app name="bulk_tagging" xmlns="uri:oozie:workflow:0.5">
|
|
<parameters>
|
|
<property>
|
|
<name>sourcePath</name>
|
|
<description>the source path</description>
|
|
</property>
|
|
<property>
|
|
<name>isLookUpUrl</name>
|
|
<description>the isLookup service endpoint</description>
|
|
</property>
|
|
<property>
|
|
<name>pathMap</name>
|
|
<description>the json path associated to each selection field</description>
|
|
</property>
|
|
<property>
|
|
<name>outputPath</name>
|
|
<description>the output path</description>
|
|
</property>
|
|
|
|
|
|
<property>
|
|
<name>postgresURL</name>
|
|
<description>the url of the postgress server to query</description>
|
|
</property>
|
|
<property>
|
|
<name>postgresUser</name>
|
|
<description>the username to access the postgres db</description>
|
|
</property>
|
|
<property>
|
|
<name>postgresPassword</name>
|
|
<description>the postgres password</description>
|
|
</property>
|
|
|
|
</parameters>
|
|
|
|
<global>
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
<name-node>${nameNode}</name-node>
|
|
<configuration>
|
|
<property>
|
|
<name>oozie.action.sharelib.for.spark</name>
|
|
<value>${oozieActionShareLibForSpark2}</value>
|
|
</property>
|
|
</configuration>
|
|
</global>
|
|
|
|
<start to="fork_exec_bulktag"/>
|
|
|
|
<kill name="Kill">
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
</kill>
|
|
|
|
|
|
<fork name="fork_exec_bulktag">
|
|
<path start="join_bulktag_publication"/>
|
|
<path start="join_bulktag_dataset"/>
|
|
<path start="join_bulktag_otherresearchproduct"/>
|
|
<path start="join_bulktag_software"/>
|
|
</fork>
|
|
|
|
<action name="join_bulktag_publication">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn-cluster</master>
|
|
<mode>cluster</mode>
|
|
<name>bulkTagging-publication</name>
|
|
<class>eu.dnetlib.dhp.bulktag.SparkBulkTagJob</class>
|
|
<jar>dhp-enrichment-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--num-executors=${sparkExecutorNumber}
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--executor-cores=${sparkExecutorCores}
|
|
--driver-memory=${sparkDriverMemory}
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
</spark-opts>
|
|
<arg>--sourcePath</arg><arg>${sourcePath}/publication</arg>
|
|
<arg>--resultTableName</arg><arg>eu.dnetlib.dhp.schema.oaf.Publication</arg>
|
|
<arg>--outputPath</arg><arg>${workingDir}/bulktag/publication</arg>
|
|
<arg>--pathMap</arg><arg>${pathMap}</arg>
|
|
<arg>--isLookUpUrl</arg><arg>${isLookUpUrl}</arg>
|
|
</spark>
|
|
<ok to="wait"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="join_bulktag_dataset">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn-cluster</master>
|
|
<mode>cluster</mode>
|
|
<name>bulkTagging-dataset</name>
|
|
<class>eu.dnetlib.dhp.bulktag.SparkBulkTagJob</class>
|
|
<jar>dhp-enrichment-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--num-executors=${sparkExecutorNumber}
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--executor-cores=${sparkExecutorCores}
|
|
--driver-memory=${sparkDriverMemory}
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
</spark-opts>
|
|
<arg>--sourcePath</arg><arg>${sourcePath}/dataset</arg>
|
|
<arg>--resultTableName</arg><arg>eu.dnetlib.dhp.schema.oaf.Dataset</arg>
|
|
<arg>--outputPath</arg><arg>${workingDir}/bulktag/dataset</arg>
|
|
<arg>--pathMap</arg><arg>${pathMap}</arg>
|
|
<arg>--isLookUpUrl</arg><arg>${isLookUpUrl}</arg>
|
|
</spark>
|
|
<ok to="wait"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="join_bulktag_otherresearchproduct">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn-cluster</master>
|
|
<mode>cluster</mode>
|
|
<name>bulkTagging-orp</name>
|
|
<class>eu.dnetlib.dhp.bulktag.SparkBulkTagJob</class>
|
|
<jar>dhp-enrichment-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--num-executors=${sparkExecutorNumber}
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--executor-cores=${sparkExecutorCores}
|
|
--driver-memory=${sparkDriverMemory}
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
</spark-opts>
|
|
<arg>--sourcePath</arg><arg>${sourcePath}/otherresearchproduct</arg>
|
|
<arg>--resultTableName</arg><arg>eu.dnetlib.dhp.schema.oaf.OtherResearchProduct</arg>
|
|
<arg>--outputPath</arg><arg>${workingDir}/bulktag/otherresearchproduct</arg>
|
|
<arg>--pathMap</arg><arg>${pathMap}</arg>
|
|
<arg>--isLookUpUrl</arg><arg>${isLookUpUrl}</arg>
|
|
</spark>
|
|
<ok to="wait"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="join_bulktag_software">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn-cluster</master>
|
|
<mode>cluster</mode>
|
|
<name>bulkTagging-software</name>
|
|
<class>eu.dnetlib.dhp.bulktag.SparkBulkTagJob</class>
|
|
<jar>dhp-enrichment-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--num-executors=${sparkExecutorNumber}
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--executor-cores=${sparkExecutorCores}
|
|
--driver-memory=${sparkDriverMemory}
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
</spark-opts>
|
|
<arg>--sourcePath</arg><arg>${sourcePath}/software</arg>
|
|
<arg>--resultTableName</arg><arg>eu.dnetlib.dhp.schema.oaf.Software</arg>
|
|
<arg>--outputPath</arg><arg>${workingDir}/bulktag/software</arg>
|
|
<arg>--pathMap</arg><arg>${pathMap}</arg>
|
|
<arg>--isLookUpUrl</arg><arg>${isLookUpUrl}</arg>
|
|
</spark>
|
|
<ok to="wait"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<join name="wait" to="eosc_tag"/>
|
|
|
|
<action name="eosc_tag">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn-cluster</master>
|
|
<mode>cluster</mode>
|
|
<name>EOSC_tagging</name>
|
|
<class>eu.dnetlib.dhp.bulktag.eosc.SparkEoscTag</class>
|
|
<jar>dhp-enrichment-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--num-executors=${sparkExecutorNumber}
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--executor-cores=${sparkExecutorCores}
|
|
--driver-memory=${sparkDriverMemory}
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
</spark-opts>
|
|
<arg>--sourcePath</arg><arg>${outputPath}</arg>
|
|
<arg>--workingPath</arg><arg>${workingDir}/bulktag</arg>
|
|
</spark>
|
|
<ok to="eosc_get_datasource_master"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="eosc_get_datasource_master">
|
|
<java>
|
|
<main-class>eu.dnetlib.dhp.bulktag.eosc.ReadMasterDatasourceFromDB</main-class>
|
|
<arg>--hdfsPath</arg><arg>${workingDir}/datasourcemaster</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>
|
|
<ok to="fork_eosc_context_tag"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<fork name="fork_eosc_context_tag">
|
|
<path start="eosc_context_tag_publication"/>
|
|
<path start="eosc_context_tag_dataset"/>
|
|
<path start="eosc_context_tag_otherresearchproduct"/>
|
|
<path start="eosc_context_tag_software"/>
|
|
</fork>
|
|
|
|
<action name="eosc_context_tag_publication">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn-cluster</master>
|
|
<mode>cluster</mode>
|
|
<name>EOSC_tagging</name>
|
|
<class>eu.dnetlib.dhp.bulktag.eosc.SparkEoscBulkTag</class>
|
|
<jar>dhp-enrichment-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--num-executors=${sparkExecutorNumber}
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--executor-cores=${sparkExecutorCores}
|
|
--driver-memory=${sparkDriverMemory}
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
</spark-opts>
|
|
<arg>--sourcePath</arg><arg>${outputPath}/publication</arg>
|
|
<arg>--workingPath</arg><arg>${workingDir}/bulktag/publication</arg>
|
|
<arg>--resultTableName</arg><arg>eu.dnetlib.dhp.schema.oaf.Publication</arg>
|
|
<arg>--datasourceMapPath</arg><arg>${workingDir}/datasourcemaster</arg>
|
|
</spark>
|
|
<ok to="wait_eosc_context_tag"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="eosc_context_tag_dataset">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn-cluster</master>
|
|
<mode>cluster</mode>
|
|
<name>EOSC_tagging</name>
|
|
<class>eu.dnetlib.dhp.bulktag.eosc.SparkEoscBulkTag</class>
|
|
<jar>dhp-enrichment-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--num-executors=${sparkExecutorNumber}
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--executor-cores=${sparkExecutorCores}
|
|
--driver-memory=${sparkDriverMemory}
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
</spark-opts>
|
|
<arg>--sourcePath</arg><arg>${outputPath}/dataset</arg>
|
|
<arg>--workingPath</arg><arg>${workingDir}/bulktag/dataset</arg>
|
|
<arg>--resultTableName</arg><arg>eu.dnetlib.dhp.schema.oaf.Dataset</arg>
|
|
<arg>--datasourceMapPath</arg><arg>${workingDir}/datasourcemaster</arg>
|
|
</spark>
|
|
<ok to="wait_eosc_context_tag"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
<action name="eosc_context_tag_software">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn-cluster</master>
|
|
<mode>cluster</mode>
|
|
<name>EOSC_tagging</name>
|
|
<class>eu.dnetlib.dhp.bulktag.eosc.SparkEoscBulkTag</class>
|
|
<jar>dhp-enrichment-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--num-executors=${sparkExecutorNumber}
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--executor-cores=${sparkExecutorCores}
|
|
--driver-memory=${sparkDriverMemory}
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
</spark-opts>
|
|
<arg>--sourcePath</arg><arg>${outputPath}/software</arg>
|
|
<arg>--workingPath</arg><arg>${workingDir}/bulktag/software</arg>
|
|
<arg>--resultTableName</arg><arg>eu.dnetlib.dhp.schema.oaf.Software</arg>
|
|
<arg>--datasourceMapPath</arg><arg>${workingDir}/datasourcemaster</arg>
|
|
</spark>
|
|
<ok to="wait_eosc_context_tag"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
<action name="eosc_context_tag_otherresearchproduct">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn-cluster</master>
|
|
<mode>cluster</mode>
|
|
<name>EOSC_tagging</name>
|
|
<class>eu.dnetlib.dhp.bulktag.eosc.SparkEoscBulkTag</class>
|
|
<jar>dhp-enrichment-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--num-executors=${sparkExecutorNumber}
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--executor-cores=${sparkExecutorCores}
|
|
--driver-memory=${sparkDriverMemory}
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
</spark-opts>
|
|
<arg>--sourcePath</arg><arg>${outputPath}/otherresearchproduct</arg>
|
|
<arg>--workingPath</arg><arg>${workingDir}/bulktag/otherresearchproduct</arg>
|
|
<arg>--resultTableName</arg><arg>eu.dnetlib.dhp.schema.oaf.OtherResearchProduct</arg>
|
|
<arg>--datasourceMapPath</arg><arg>${workingDir}/datasourcemaster</arg>
|
|
</spark>
|
|
<ok to="wait_eosc_context_tag"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
<join name="wait_eosc_context_tag" to="reset_workingDir"/>
|
|
|
|
<action name="reset_workingDir">
|
|
<fs>
|
|
<delete path="${workingDir}"/>
|
|
<mkdir path="${workingDir}"/>
|
|
</fs>
|
|
<ok to="End"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app> |