2020-11-17 18:23:12 +01:00
|
|
|
<workflow-app name="Orcid Updates Download" xmlns="uri:oozie:workflow:0.5">
|
|
|
|
<parameters>
|
|
|
|
<property>
|
|
|
|
<name>workingPath</name>
|
|
|
|
<description>the working dir base path</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>token</name>
|
|
|
|
<description>access token</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>shell_cmd</name>
|
|
|
|
<value>wget -O /tmp/last_modified.csv.tar http://74804fb637bd8e2fba5b-e0a029c2f87486cddec3b416996a6057.r3.cf1.rackcdn.com/last_modified.csv.tar ; hdfs dfs -copyFromLocal /tmp/last_modified.csv.tar /data/orcid_activities_2020/last_modified.csv.tar ; rm -f /tmp/last_modified.csv.tar
|
|
|
|
</value>
|
|
|
|
<description>the shell command that downloads the lambda file from orcid containing last orcid update informations</description>
|
|
|
|
</property>
|
2020-11-23 09:49:22 +01:00
|
|
|
<property>
|
|
|
|
<name>sparkExecutorNumber</name>
|
|
|
|
<value>20</value>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>sparkDriverMemory</name>
|
|
|
|
<value>7G</value>
|
|
|
|
<description>memory for driver process</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>sparkExecutorMemory</name>
|
|
|
|
<value>2G</value>
|
|
|
|
<description>memory for individual executor</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>sparkExecutorCores</name>
|
|
|
|
<value>1</value>
|
|
|
|
<description>number of cores used by single executor</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>spark2MaxExecutors</name>
|
|
|
|
<value>20</value>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>oozieActionShareLibForSpark2</name>
|
|
|
|
<description>oozie action sharelib for spark 2.*</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>spark2ExtraListeners</name>
|
|
|
|
<value>com.cloudera.spark.lineage.NavigatorAppListener</value>
|
|
|
|
<description>spark 2.* extra listeners classname</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>spark2SqlQueryExecutionListeners</name>
|
|
|
|
<value>com.cloudera.spark.lineage.NavigatorQueryListener</value>
|
|
|
|
<description>spark 2.* sql query execution listeners classname</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>spark2YarnHistoryServerAddress</name>
|
|
|
|
<description>spark 2.* yarn history server address</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>spark2EventLogDir</name>
|
|
|
|
<description>spark 2.* event log dir location</description>
|
|
|
|
</property>
|
2020-11-17 18:23:12 +01:00
|
|
|
</parameters>
|
2020-11-23 09:49:22 +01:00
|
|
|
|
|
|
|
<global>
|
|
|
|
<configuration>
|
|
|
|
<property>
|
|
|
|
<name>oozie.action.sharelib.for.spark</name>
|
|
|
|
<value>${oozieActionShareLibForSpark2}</value>
|
|
|
|
</property>
|
|
|
|
</configuration>
|
|
|
|
</global>
|
|
|
|
|
|
|
|
<start to="DownloadOrcidAuthors"/>
|
2020-11-17 18:23:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
|
|
|
|
|
|
|
<action name="ResetWorkingPath">
|
|
|
|
<fs>
|
|
|
|
<delete path='${workingPath}/downloads'/>
|
2020-11-23 09:49:22 +01:00
|
|
|
<delete path='${workingPath}/last_modified.csv.tar'/>
|
2020-11-17 18:23:12 +01:00
|
|
|
<mkdir path='${workingPath}/downloads'/>
|
|
|
|
</fs>
|
|
|
|
<ok to="DownloadLambdaFile"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="DownloadLambdaFile">
|
|
|
|
<shell xmlns="uri:oozie:shell-action:0.1">
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<exec>bash</exec>
|
|
|
|
<argument>-c</argument>
|
|
|
|
<argument>${shell_cmd}</argument>
|
|
|
|
<capture-output/>
|
|
|
|
</shell>
|
2020-11-23 09:49:22 +01:00
|
|
|
<ok to="DownloadUpdatedXMLAuthors"/>
|
2020-11-17 18:23:12 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-11-23 09:49:22 +01:00
|
|
|
<action name="DownloadUpdatedXMLAuthors">
|
2020-11-17 18:23:12 +01:00
|
|
|
<java>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<main-class>eu.dnetlib.doiboost.orcid.OrcidDownloader</main-class>
|
2020-11-23 09:49:22 +01:00
|
|
|
<arg>-w</arg><arg>${workingPath}/</arg>
|
2020-11-17 18:23:12 +01:00
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
2020-11-23 09:49:22 +01:00
|
|
|
<arg>-f</arg><arg>last_modified.csv.tar</arg>
|
|
|
|
<arg>-o</arg><arg>downloads/</arg>
|
2020-11-17 18:23:12 +01:00
|
|
|
<arg>-t</arg><arg>${token}</arg>
|
|
|
|
</java>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2020-11-23 09:49:22 +01:00
|
|
|
|
|
|
|
<action name="GenLastModifiedSeq">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>GenLastModifiedSeq</name>
|
|
|
|
<class>eu.dnetlib.doiboost.orcid.SparkGenLastModifiedSeq</class>
|
|
|
|
<jar>dhp-doiboost-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--executor-cores=${sparkExecutorCores}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
|
|
</spark-opts>
|
|
|
|
<arg>-w</arg><arg>${workingPath}/</arg>
|
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-f</arg><arg>last_modified.csv.tar</arg>
|
|
|
|
<arg>-o</arg><arg>last_modified.seq</arg>
|
|
|
|
<arg>-t</arg><arg>-</arg>
|
|
|
|
</spark>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="DownloadOrcidAuthors">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>DownloadOrcidAuthors</name>
|
|
|
|
<class>eu.dnetlib.doiboost.orcid.SparkDownloadOrcidAuthors</class>
|
|
|
|
<jar>dhp-doiboost-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
2020-11-23 16:01:23 +01:00
|
|
|
--conf spark.dynamicAllocation.enabled=true
|
|
|
|
--conf spark.dynamicAllocation.maxExecutors=${spark2MaxExecutors}
|
2020-11-23 09:49:22 +01:00
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
|
|
</spark-opts>
|
|
|
|
<arg>-w</arg><arg>${workingPath}/</arg>
|
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-f</arg><arg>last_modified.seq</arg>
|
|
|
|
<arg>-o</arg><arg>downloads/updated_authors</arg>
|
|
|
|
<arg>-t</arg><arg>${token}</arg>
|
|
|
|
</spark>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2020-11-17 18:23:12 +01:00
|
|
|
|
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app>
|