2021-11-15 14:45:54 +01:00
|
|
|
<workflow-app name="Resolve relation and entities" xmlns="uri:oozie:workflow:0.5">
|
2021-07-23 11:40:06 +02:00
|
|
|
<parameters>
|
|
|
|
<property>
|
2021-10-20 17:12:08 +02:00
|
|
|
<name>graphBasePath</name>
|
|
|
|
<description>the path of the graph</description>
|
2021-07-23 11:40:06 +02:00
|
|
|
</property>
|
2021-11-11 10:25:42 +01:00
|
|
|
<property>
|
|
|
|
<name>unresolvedPath</name>
|
|
|
|
<description>the path of the unresolved Entities</description>
|
|
|
|
</property>
|
2021-11-22 11:48:55 +01:00
|
|
|
<property>
|
|
|
|
<name>targetPath</name>
|
|
|
|
<description>the target path after resolution</description>
|
|
|
|
</property>
|
2021-11-26 15:38:56 +01:00
|
|
|
<property>
|
|
|
|
<name>shouldResolveEntities</name>
|
|
|
|
<value>true</value>
|
|
|
|
<description>allows to activate/deactivate the resolution process over the entities</description>
|
|
|
|
</property>
|
2021-07-23 11:40:06 +02:00
|
|
|
</parameters>
|
|
|
|
|
2021-10-20 17:12:08 +02:00
|
|
|
<start to="ResolveRelations"/>
|
2021-07-23 11:40:06 +02:00
|
|
|
|
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
|
|
|
|
|
|
|
<action name="ResolveRelations">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>Resolve Relations in raw graph</name>
|
2021-10-20 17:12:08 +02:00
|
|
|
<class>eu.dnetlib.dhp.oa.graph.resolution.SparkResolveRelation</class>
|
2021-07-23 11:40:06 +02:00
|
|
|
<jar>dhp-graph-mapper-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--executor-cores=${sparkExecutorCores}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
2021-10-28 16:18:17 +02:00
|
|
|
--conf spark.sql.shuffle.partitions=15000
|
2021-07-23 11:40:06 +02:00
|
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
|
|
</spark-opts>
|
|
|
|
<arg>--master</arg><arg>yarn</arg>
|
2021-10-20 17:12:08 +02:00
|
|
|
<arg>--graphBasePath</arg><arg>${graphBasePath}</arg>
|
|
|
|
<arg>--workingPath</arg><arg>${workingDir}</arg>
|
2021-11-22 11:48:55 +01:00
|
|
|
<arg>--targetPath</arg><arg>${targetPath}</arg>
|
2021-07-23 11:40:06 +02:00
|
|
|
</spark>
|
2021-11-26 15:38:56 +01:00
|
|
|
<ok to="decision_resolveEntities"/>
|
2021-07-23 11:40:06 +02:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2021-11-11 10:25:42 +01:00
|
|
|
|
2021-11-26 15:38:56 +01:00
|
|
|
<decision name="decision_resolveEntities">
|
|
|
|
<switch>
|
|
|
|
<case to="copy_result">${wf:conf('shouldResolveEntities') eq false}</case>
|
|
|
|
<case to="ResolveEntities">${wf:conf('shouldResolveEntities') eq true}</case>
|
|
|
|
<default to="ResolveEntities"/>
|
|
|
|
</switch>
|
|
|
|
</decision>
|
|
|
|
|
2021-11-11 10:25:42 +01:00
|
|
|
<action name="ResolveEntities">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
2021-11-15 14:42:43 +01:00
|
|
|
<name>Resolve Entities in raw graph</name>
|
2021-11-11 10:25:42 +01:00
|
|
|
<class>eu.dnetlib.dhp.oa.graph.resolution.SparkResolveEntities</class>
|
|
|
|
<jar>dhp-graph-mapper-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--executor-cores=${sparkExecutorCores}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
|
|
--conf spark.sql.shuffle.partitions=10000
|
|
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
|
|
</spark-opts>
|
|
|
|
<arg>--master</arg><arg>yarn</arg>
|
|
|
|
<arg>--graphBasePath</arg><arg>${graphBasePath}</arg>
|
|
|
|
<arg>--unresolvedPath</arg><arg>${unresolvedPath}</arg>
|
|
|
|
<arg>--workingPath</arg><arg>${workingDir}</arg>
|
2021-11-22 11:48:55 +01:00
|
|
|
<arg>--targetPath</arg><arg>${targetPath}</arg>
|
2021-11-11 10:25:42 +01:00
|
|
|
</spark>
|
2021-11-22 15:55:24 +01:00
|
|
|
<ok to="copy_entities"/>
|
2021-11-11 10:25:42 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2021-11-26 15:38:56 +01:00
|
|
|
<fork name="copy_result">
|
|
|
|
<path start="copy_publication"/>
|
|
|
|
<path start="copy_dataset"/>
|
|
|
|
<path start="copy_otherresearchproduct"/>
|
|
|
|
<path start="copy_software"/>
|
|
|
|
</fork>
|
|
|
|
|
|
|
|
<action name="copy_publication">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphBasePath}/publication</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/publication</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="copy_wait_result"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="copy_dataset">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphBasePath}/dataset</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/dataset</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="copy_wait_result"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="copy_otherresearchproduct">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphBasePath}/otherresearchproduct</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/otherresearchproduct</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="copy_wait_result"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="copy_software">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphBasePath}/software</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/software</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="copy_wait_result"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<join name="copy_wait_result" to="copy_entities"/>
|
|
|
|
|
2021-11-22 15:55:24 +01:00
|
|
|
<fork name="copy_entities">
|
|
|
|
<path start="copy_organization"/>
|
|
|
|
<path start="copy_projects"/>
|
2021-11-26 15:38:56 +01:00
|
|
|
<path start="copy_datasource"/>
|
2021-11-22 15:55:24 +01:00
|
|
|
</fork>
|
|
|
|
|
|
|
|
<action name="copy_organization">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphBasePath}/organization</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/organization</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="copy_wait"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="copy_projects">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphBasePath}/project</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/project</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="copy_wait"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2021-11-26 15:38:56 +01:00
|
|
|
<action name="copy_datasource">
|
2021-11-22 15:55:24 +01:00
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
|
|
|
<arg>${nameNode}/${graphBasePath}/datasource</arg>
|
|
|
|
<arg>${nameNode}/${targetPath}/datasource</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="copy_wait"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<join name="copy_wait" to="End"/>
|
2021-11-15 14:31:15 +01:00
|
|
|
|
2021-11-22 15:55:24 +01:00
|
|
|
<end name="End"/>
|
2021-07-23 11:40:06 +02:00
|
|
|
</workflow-app>
|