2023-11-30 14:51:00 +01:00
|
|
|
<workflow-app name="Enrich_graph_with_ORCID_Workflow" xmlns="uri:oozie:workflow:0.5">
|
2023-11-24 12:39:58 +01:00
|
|
|
<parameters>
|
|
|
|
<property>
|
|
|
|
<name>orcidPath</name>
|
|
|
|
<description>the path of the orcid Table generated by the dump</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>graphPath</name>
|
|
|
|
<description>the path of the graph we want to apply enrichment</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>targetPath</name>
|
|
|
|
<description>the output path of the graph enriched</description>
|
|
|
|
</property>
|
|
|
|
</parameters>
|
|
|
|
|
|
|
|
<start to="EnrichGraph"/>
|
|
|
|
|
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
|
|
|
|
|
|
|
<action name="EnrichGraph">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>Enrich Graph with ORCID</name>
|
|
|
|
<class>eu.dnetlib.dhp.enrich.orcid.SparkEnrichGraphWithOrcidAuthors</class>
|
|
|
|
<jar>dhp-graph-mapper-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--executor-cores=${sparkExecutorCores}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
--conf spark.executor.memoryOverhead=2g
|
|
|
|
--conf spark.sql.shuffle.partitions=3000
|
|
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
|
|
</spark-opts>
|
2023-12-06 19:41:53 +01:00
|
|
|
<arg>--orcidPath</arg><arg>${orcidPath}</arg>
|
|
|
|
<arg>--targetPath</arg><arg>${targetPath}</arg>
|
|
|
|
<arg>--graphPath</arg><arg>${graphPath}</arg>
|
|
|
|
<arg>--master</arg><arg>yarn</arg>
|
2023-11-24 12:39:58 +01:00
|
|
|
</spark>
|
2024-01-19 16:28:05 +01:00
|
|
|
<ok to="reset_outputpath"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="reset_outputpath">
|
|
|
|
<fs>
|
|
|
|
<delete path="${graphPath}/datasource"/>
|
|
|
|
<delete path="${graphPath}/organization"/>
|
|
|
|
<delete path="${graphPath}/project"/>
|
|
|
|
<delete path="${graphPath}/relation"/>
|
|
|
|
</fs>
|
2023-12-06 19:41:53 +01:00
|
|
|
<ok to="copy_datasource"/>
|
2023-11-24 12:39:58 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2023-11-30 14:51:00 +01:00
|
|
|
<action name="copy_datasource">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphPath}/datasource</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/datasource</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="copy_organization"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
<action name="copy_organization">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphPath}/organization</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/organization</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="copy_project"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
<action name="copy_project">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphPath}/project</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/project</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="copy_relation"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
<action name="copy_relation">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphPath}/relation</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/relation</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2023-11-24 12:39:58 +01:00
|
|
|
<end name="End"/>
|
|
|
|
|
|
|
|
</workflow-app>
|