2021-09-22 15:18:05 +02:00
|
|
|
<workflow-app name="OpenCitations Integration" xmlns="uri:oozie:workflow:0.5">
|
|
|
|
|
|
|
|
<global>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<configuration>
|
|
|
|
<property>
|
|
|
|
<name>mapreduce.job.queuename</name>
|
|
|
|
<value>${queueName}</value>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>oozie.launcher.mapred.job.queue.name</name>
|
|
|
|
<value>${oozieLauncherQueueName}</value>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>oozie.action.sharelib.for.spark</name>
|
|
|
|
<value>${oozieActionShareLibForSpark2}</value>
|
|
|
|
</property>
|
|
|
|
|
|
|
|
</configuration>
|
|
|
|
</global>
|
|
|
|
|
2021-09-27 16:02:06 +02:00
|
|
|
<start to="resume_from"/>
|
2021-09-22 15:18:05 +02:00
|
|
|
|
2021-09-27 16:02:06 +02:00
|
|
|
<decision name="resume_from">
|
|
|
|
<switch>
|
|
|
|
<case to="download">${wf:conf('resumeFrom') eq 'DownloadDump'}</case>
|
|
|
|
<case to="extract">${wf:conf('resumeFrom') eq 'ExtractContent'}</case>
|
2022-02-07 18:32:08 +01:00
|
|
|
<case to="read">${wf:conf('resumeFrom') eq 'ReadContent'}</case>
|
2024-03-06 13:42:00 +01:00
|
|
|
<case to="create_actionset">${wf:conf('resumeFrom') eq 'CreateAS'}</case>
|
|
|
|
<default to="deleteoutputpath"/> <!-- first action to be done when downloadDump is to be performed -->
|
2021-09-27 16:02:06 +02:00
|
|
|
</switch>
|
|
|
|
</decision>
|
2021-09-22 15:18:05 +02:00
|
|
|
|
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
2023-10-04 12:32:05 +02:00
|
|
|
|
2024-03-06 13:42:00 +01:00
|
|
|
<action name="deleteoutputpath">
|
|
|
|
<fs>
|
|
|
|
<delete path='${inputPath}'/>
|
|
|
|
<mkdir path='${inputPath}'/>
|
|
|
|
</fs>
|
|
|
|
<ok to="download"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2021-09-22 15:18:05 +02:00
|
|
|
<action name="download">
|
|
|
|
<shell xmlns="uri:oozie:shell-action:0.2">
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<configuration>
|
|
|
|
<property>
|
|
|
|
<name>mapred.job.queue.name</name>
|
|
|
|
<value>${queueName}</value>
|
|
|
|
</property>
|
|
|
|
</configuration>
|
|
|
|
<exec>download.sh</exec>
|
2021-09-27 16:02:06 +02:00
|
|
|
<argument>${filelist}</argument>
|
2024-03-06 13:42:00 +01:00
|
|
|
<argument>${inputPath}/Original</argument>
|
|
|
|
<env-var>HADOOP_USER_NAME=${wf:user()}</env-var>
|
|
|
|
<file>download.sh</file>
|
|
|
|
<capture-output/>
|
|
|
|
</shell>
|
|
|
|
<ok to="download_correspondence"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
<!-- downloads the correspondence from the omid and the pid (doi, pmid etc)-->
|
|
|
|
<action name="download_correspondence">
|
|
|
|
<shell xmlns="uri:oozie:shell-action:0.2">
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<configuration>
|
|
|
|
<property>
|
|
|
|
<name>mapred.job.queue.name</name>
|
|
|
|
<value>${queueName}</value>
|
|
|
|
</property>
|
|
|
|
</configuration>
|
|
|
|
<exec>download_corr.sh</exec>
|
|
|
|
<argument>${filecorrespondence}</argument>
|
|
|
|
<argument>${inputPath}/correspondence</argument>
|
2021-09-22 15:18:05 +02:00
|
|
|
<env-var>HADOOP_USER_NAME=${wf:user()}</env-var>
|
|
|
|
<file>download.sh</file>
|
|
|
|
<capture-output/>
|
|
|
|
</shell>
|
2021-09-27 16:02:06 +02:00
|
|
|
<ok to="extract"/>
|
2021-09-22 15:18:05 +02:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2023-10-04 12:32:05 +02:00
|
|
|
|
2021-09-22 15:18:05 +02:00
|
|
|
<action name="extract">
|
|
|
|
<java>
|
|
|
|
<main-class>eu.dnetlib.dhp.actionmanager.opencitations.GetOpenCitationsRefs</main-class>
|
|
|
|
<arg>--hdfsNameNode</arg><arg>${nameNode}</arg>
|
2024-03-06 13:42:00 +01:00
|
|
|
<arg>--inputPath</arg><arg>${inputPath}/Original</arg>
|
|
|
|
<arg>--outputPath</arg><arg>${inputPath}/Extracted</arg>
|
|
|
|
</java>
|
|
|
|
<ok to="read"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="extract_correspondence">
|
|
|
|
<java>
|
|
|
|
<main-class>eu.dnetlib.dhp.actionmanager.opencitations.GetOpenCitationsRefs</main-class>
|
|
|
|
<arg>--hdfsNameNode</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>--inputPath</arg><arg>${inputPath}/correspondence</arg>
|
|
|
|
<arg>--outputPath</arg><arg>${inputPath}/correspondence_extracted</arg>
|
2021-09-22 15:18:05 +02:00
|
|
|
</java>
|
2022-02-07 18:32:08 +01:00
|
|
|
<ok to="read"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="read">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>Produces the AS for OC</name>
|
|
|
|
<class>eu.dnetlib.dhp.actionmanager.opencitations.ReadCOCI</class>
|
|
|
|
<jar>dhp-aggregation-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--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}
|
|
|
|
--conf spark.sql.warehouse.dir=${sparkSqlWarehouseDir}
|
|
|
|
</spark-opts>
|
2024-03-06 13:42:00 +01:00
|
|
|
<arg>--inputPath</arg><arg>${inputPath}/Extracted</arg>
|
|
|
|
<arg>--outputPath</arg><arg>${inputPath}/JSON</arg>
|
2022-02-07 18:32:08 +01:00
|
|
|
<arg>--delimiter</arg><arg>${delimiter}</arg>
|
2024-03-06 13:42:00 +01:00
|
|
|
<arg>--hdfsNameNode</arg><arg>${nameNode}</arg>
|
|
|
|
</spark>
|
|
|
|
<ok to="remap"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="remap">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>Produces the AS for OC</name>
|
|
|
|
<class>eu.dnetlib.dhp.actionmanager.opencitations.MapOCIdsInPids</class>
|
|
|
|
<jar>dhp-aggregation-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--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}
|
|
|
|
--conf spark.sql.warehouse.dir=${sparkSqlWarehouseDir}
|
|
|
|
</spark-opts>
|
|
|
|
<arg>--inputPath</arg><arg>${inputPath}</arg>
|
|
|
|
<arg>--outputPath</arg><arg>${outputPathExtraction}</arg>
|
2022-02-07 18:32:08 +01:00
|
|
|
</spark>
|
2021-09-27 16:02:06 +02:00
|
|
|
<ok to="create_actionset"/>
|
2021-09-22 15:18:05 +02:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2021-09-27 16:02:06 +02:00
|
|
|
<action name="create_actionset">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>Produces the AS for OC</name>
|
|
|
|
<class>eu.dnetlib.dhp.actionmanager.opencitations.CreateActionSetSparkJob</class>
|
|
|
|
<jar>dhp-aggregation-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--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}
|
|
|
|
--conf spark.sql.warehouse.dir=${sparkSqlWarehouseDir}
|
|
|
|
</spark-opts>
|
2024-03-06 13:42:00 +01:00
|
|
|
<arg>--inputPath</arg><arg>${outputPathExtraction}</arg>
|
2021-09-27 16:02:06 +02:00
|
|
|
<arg>--outputPath</arg><arg>${outputPath}</arg>
|
|
|
|
</spark>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2021-09-22 15:18:05 +02:00
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app>
|