2020-05-11 09:38:27 +02:00
|
|
|
<workflow-app name="import Crossref from index into HDFS" xmlns="uri:oozie:workflow:0.5">
|
|
|
|
<parameters>
|
|
|
|
<property>
|
|
|
|
<name>workingPath</name>
|
|
|
|
<description>the working dir base 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>
|
|
|
|
<property>
|
|
|
|
<name>sparkExecutorCores</name>
|
|
|
|
<description>number of cores used by single executor</description>
|
|
|
|
</property>
|
2020-12-07 10:42:38 +01:00
|
|
|
<property>
|
|
|
|
<name>timestamp</name>
|
|
|
|
<description>Timestamp for incremental Harvesting</description>
|
|
|
|
</property>
|
2020-05-28 09:57:46 +02:00
|
|
|
|
2020-05-11 09:38:27 +02:00
|
|
|
</parameters>
|
|
|
|
|
2020-12-07 10:42:38 +01:00
|
|
|
<start to="ImportCrossRef"/>
|
2020-05-11 09:38:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
|
|
|
|
2020-12-07 10:42:38 +01:00
|
|
|
<action name="ImportCrossRef">
|
|
|
|
<java>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<main-class>eu.dnetlib.doiboost.crossref.CrossrefImporter</main-class>
|
|
|
|
<arg>-t</arg><arg>${workingPath}/input/crossref/index_update</arg>
|
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-ts</arg><arg>${timestamp}</arg>
|
|
|
|
</java>
|
|
|
|
<ok to="GenerateDataset"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2020-05-11 09:38:27 +02:00
|
|
|
|
2020-12-07 10:42:38 +01:00
|
|
|
<action name="GenerateDataset">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>ExtractCrossrefToOAF</name>
|
|
|
|
<class>eu.dnetlib.doiboost.crossref.CrossrefDataset</class>
|
|
|
|
<jar>dhp-doiboost-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--executor-cores=${sparkExecutorCores}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
--conf spark.sql.shuffle.partitions=3840
|
|
|
|
${sparkExtraOPT}
|
|
|
|
</spark-opts>
|
|
|
|
<arg>--workingPath</arg><arg>/data/doiboost/input/crossref</arg>
|
|
|
|
<arg>--master</arg><arg>yarn-cluster</arg>
|
|
|
|
</spark>
|
|
|
|
<ok to="RenameDataset"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2020-05-11 09:38:27 +02:00
|
|
|
|
2020-12-07 10:42:38 +01:00
|
|
|
<action name="RenameDataset">
|
|
|
|
<fs>
|
|
|
|
<delete path='${workingPath}/input/crossref/crossref_ds'/>
|
|
|
|
<move source="${workingPath}/input/crossref/crossref_ds_updated"
|
|
|
|
target="${workingPath}/input/crossref/crossref_ds"/>
|
|
|
|
</fs>
|
|
|
|
<ok to="ConvertCrossrefToOAF"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2020-05-11 09:38:27 +02:00
|
|
|
|
|
|
|
|
2020-12-07 10:42:38 +01:00
|
|
|
<action name="ConvertCrossrefToOAF">
|
2020-05-11 09:38:27 +02:00
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
2020-12-07 10:42:38 +01:00
|
|
|
<name>ConvertCrossrefToOAF</name>
|
2020-05-11 09:38:27 +02:00
|
|
|
<class>eu.dnetlib.doiboost.crossref.SparkMapDumpIntoOAF</class>
|
|
|
|
<jar>dhp-doiboost-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--executor-cores=${sparkExecutorCores}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
2020-12-07 10:42:38 +01:00
|
|
|
--conf spark.sql.shuffle.partitions=3840
|
2020-05-11 09:38:27 +02:00
|
|
|
${sparkExtraOPT}
|
|
|
|
</spark-opts>
|
2020-11-25 17:15:54 +01:00
|
|
|
<arg>--sourcePath</arg><arg>${workingPath}/input/crossref/crossref_ds</arg>
|
2020-12-07 10:42:38 +01:00
|
|
|
<arg>--targetPath</arg><arg>${workingPath}/process/</arg>
|
2020-05-11 09:38:27 +02:00
|
|
|
<arg>--master</arg><arg>yarn-cluster</arg>
|
|
|
|
</spark>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app>
|