2019-12-06 13:38:00 +01:00
|
|
|
<workflow-app name="Dedup Entities" xmlns="uri:oozie:workflow:0.5">
|
|
|
|
<parameters>
|
|
|
|
<property>
|
|
|
|
<name>sourcePath</name>
|
|
|
|
<description>the source path</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>entity</name>
|
|
|
|
<description>the entity that should be processed</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>dedupConf</name>
|
|
|
|
<description>the dedup Configuration</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>targetPath</name>
|
|
|
|
<description>the target path</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>sparkDriverMemory</name>
|
|
|
|
<description>memory for driver process</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>sparkExecutorMemory</name>
|
|
|
|
<description>memory for individual executor</description>
|
|
|
|
</property>
|
|
|
|
</parameters>
|
|
|
|
|
2020-03-13 09:13:20 +01:00
|
|
|
<start to="DeleteWorkingPath"/>
|
2019-12-06 13:38:00 +01:00
|
|
|
|
|
|
|
|
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
|
|
|
|
2020-02-19 10:07:08 +01:00
|
|
|
<action name="DeleteWorkingPath">
|
|
|
|
<fs>
|
|
|
|
<delete path='${targetPath}/${entity}'/>
|
|
|
|
<mkdir path="${targetPath}"/>
|
|
|
|
<mkdir path="${targetPath}/${entity}"/>
|
|
|
|
</fs>
|
|
|
|
<ok to="CreateSimRels"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2019-12-06 13:38:00 +01:00
|
|
|
|
|
|
|
<action name="CreateSimRels">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>Create Similarity Relations</name>
|
|
|
|
<class>eu.dnetlib.dedup.SparkCreateSimRels</class>
|
|
|
|
<jar>dhp-dedup-${projectVersion}.jar</jar>
|
2020-02-19 10:07:08 +01:00
|
|
|
<spark-opts>
|
|
|
|
--executor-memory ${sparkExecutorMemory}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
2020-02-24 10:15:55 +01:00
|
|
|
${sparkExtraOPT}
|
2019-12-06 13:38:00 +01:00
|
|
|
</spark-opts>
|
|
|
|
<arg>-mt</arg><arg>yarn-cluster</arg>
|
|
|
|
<arg>--sourcePath</arg><arg>${sourcePath}</arg>
|
|
|
|
<arg>--targetPath</arg><arg>${targetPath}</arg>
|
|
|
|
<arg>--entity</arg><arg>${entity}</arg>
|
|
|
|
<arg>--dedupConf</arg><arg>${dedupConf}</arg>
|
|
|
|
</spark>
|
|
|
|
<ok to="CreateConnectedComponents"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="CreateConnectedComponents">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>Create Connected Components</name>
|
|
|
|
<class>eu.dnetlib.dedup.SparkCreateConnectedComponent</class>
|
|
|
|
<jar>dhp-dedup-${projectVersion}.jar</jar>
|
2020-02-19 10:07:08 +01:00
|
|
|
<spark-opts>
|
|
|
|
--executor-memory ${sparkExecutorMemory}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
2020-02-24 10:15:55 +01:00
|
|
|
${sparkExtraOPT}
|
2019-12-06 13:38:00 +01:00
|
|
|
</spark-opts>
|
|
|
|
<arg>-mt</arg><arg>yarn-cluster</arg>
|
|
|
|
<arg>--sourcePath</arg><arg>${sourcePath}</arg>
|
|
|
|
<arg>--targetPath</arg><arg>${targetPath}</arg>
|
|
|
|
<arg>--entity</arg><arg>${entity}</arg>
|
|
|
|
<arg>--dedupConf</arg><arg>${dedupConf}</arg>
|
|
|
|
</spark>
|
2019-12-11 15:43:24 +01:00
|
|
|
<ok to="CreateDedupRecord"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="CreateDedupRecord">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
2019-12-18 16:28:22 +01:00
|
|
|
<name>Create Dedup Record</name>
|
2019-12-11 15:43:24 +01:00
|
|
|
<class>eu.dnetlib.dedup.SparkCreateDedupRecord</class>
|
|
|
|
<jar>dhp-dedup-${projectVersion}.jar</jar>
|
2020-02-19 10:07:08 +01:00
|
|
|
<spark-opts>
|
|
|
|
--executor-memory ${sparkExecutorMemory}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
2020-02-24 10:15:55 +01:00
|
|
|
${sparkExtraOPT}
|
2019-12-11 15:43:24 +01:00
|
|
|
</spark-opts>
|
|
|
|
<arg>-mt</arg><arg>yarn-cluster</arg>
|
|
|
|
<arg>--sourcePath</arg><arg>${sourcePath}</arg>
|
2020-02-19 10:07:08 +01:00
|
|
|
<arg>--dedupPath</arg><arg>${targetPath}</arg>
|
2019-12-11 15:43:24 +01:00
|
|
|
<arg>--entity</arg><arg>${entity}</arg>
|
|
|
|
<arg>--dedupConf</arg><arg>${dedupConf}</arg>
|
|
|
|
</spark>
|
2020-02-19 10:07:08 +01:00
|
|
|
<ok to="fixRelation"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="fixRelation">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>Propagate Dedup Relations</name>
|
|
|
|
<class>eu.dnetlib.dedup.SparkPropagateRelationsJob</class>
|
|
|
|
<jar>dhp-dedup-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-memory ${sparkExecutorMemory}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
2020-02-24 10:15:55 +01:00
|
|
|
${sparkExtraOPT}
|
2020-02-19 10:07:08 +01:00
|
|
|
</spark-opts>
|
|
|
|
<arg>-mt</arg><arg>yarn-cluster</arg>
|
|
|
|
<arg>--mergeRelPath</arg><arg>${targetPath}/${entity}/mergeRel</arg>
|
|
|
|
<arg>--relationPath</arg><arg>${sourcePath}/relation</arg>
|
2020-03-13 09:13:20 +01:00
|
|
|
<arg>--targetRelPath</arg><arg>${targetPath}/${entity}/updated_relation</arg>
|
2020-02-19 10:07:08 +01:00
|
|
|
</spark>
|
2020-02-24 10:15:55 +01:00
|
|
|
<ok to="updateDeletedByInferenceEntity"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
|
|
|
|
<action name="updateDeletedByInferenceEntity">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>Update ${entity} and add DedupRecord</name>
|
|
|
|
<class>eu.dnetlib.dedup.SparkUpdateEntityJob</class>
|
|
|
|
<jar>dhp-dedup-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-memory ${sparkExecutorMemory}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
${sparkExtraOPT}
|
|
|
|
</spark-opts>
|
|
|
|
<arg>-mt</arg><arg>yarn-cluster</arg>
|
|
|
|
<arg>--entityPath</arg><arg>${sourcePath}/${entity}</arg>
|
|
|
|
<arg>--mergeRelPath</arg><arg>${targetPath}/${entity}/mergeRel</arg>
|
|
|
|
<arg>--entity</arg><arg>${entity}</arg>
|
|
|
|
<arg>--dedupRecordPath</arg><arg>${targetPath}/${entity}/dedup_records</arg>
|
|
|
|
<arg>--targetPath</arg><arg>${targetPath}/${entity}/updated_record</arg>
|
|
|
|
</spark>
|
|
|
|
<ok to="replaceEntity"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-03-13 09:13:20 +01:00
|
|
|
<!-- <action name="updateDeletedByInferenceRelation">-->
|
|
|
|
<!-- <spark xmlns="uri:oozie:spark-action:0.2">-->
|
|
|
|
<!-- <job-tracker>${jobTracker}</job-tracker>-->
|
|
|
|
<!-- <name-node>${nameNode}</name-node>-->
|
|
|
|
<!-- <master>yarn-cluster</master>-->
|
|
|
|
<!-- <mode>cluster</mode>-->
|
|
|
|
<!-- <name>Update ${entity} set deleted by Inference</name>-->
|
|
|
|
<!-- <class>eu.dnetlib.dedup.SparkUpdateEntityJob</class>-->
|
|
|
|
<!-- <jar>dhp-dedup-${projectVersion}.jar</jar>-->
|
|
|
|
<!-- <spark-opts>-->
|
|
|
|
<!-- --executor-memory ${sparkExecutorMemory}-->
|
|
|
|
<!-- --driver-memory=${sparkDriverMemory}-->
|
|
|
|
<!-- ${sparkExtraOPT}-->
|
|
|
|
<!-- </spark-opts>-->
|
|
|
|
<!-- <arg>-mt</arg><arg>yarn-cluster</arg>-->
|
|
|
|
<!-- <arg>--entityPath</arg><arg>${targetPath}/${entity}/relation_propagated</arg>-->
|
|
|
|
<!-- <arg>--mergeRelPath</arg><arg>${targetPath}/${entity}/mergeRel</arg>-->
|
|
|
|
<!-- <arg>--entity</arg><arg>relation</arg>-->
|
|
|
|
<!-- <arg>--dedupRecordPath</arg><arg>${targetPath}/${entity}/dedup_records</arg>-->
|
|
|
|
<!-- <arg>--targetPath</arg><arg>${targetPath}/${entity}/updated_relation</arg>-->
|
|
|
|
<!-- </spark>-->
|
|
|
|
<!-- <ok to="End"/>-->
|
|
|
|
<!-- <error to="Kill"/>-->
|
|
|
|
<!-- </action>-->
|
|
|
|
|
2020-02-24 10:15:55 +01:00
|
|
|
|
|
|
|
<action name="replaceEntity">
|
|
|
|
<fs>
|
|
|
|
<delete path='${sourcePath}/${entity}'/>
|
|
|
|
<delete path='${sourcePath}/relation'/>
|
|
|
|
<move source="${targetPath}/${entity}/updated_relation" target="${sourcePath}/relation" />
|
|
|
|
<move source="${targetPath}/${entity}/updated_record" target="${sourcePath}/${entity}" />
|
|
|
|
</fs>
|
2019-12-06 13:38:00 +01:00
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-02-19 10:07:08 +01:00
|
|
|
|
2019-12-06 13:38:00 +01:00
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app>
|