88 lines
2.9 KiB
XML
88 lines
2.9 KiB
XML
<workflow-app name="bulk_tagging" xmlns="uri:oozie:workflow:0.5">
|
|
<parameters>
|
|
<property>
|
|
<name>sourcePath</name>
|
|
<description>the source path</description>
|
|
</property>
|
|
<property>
|
|
<name>pathMap</name>
|
|
<description>the json path associated to each selection field</description>
|
|
</property>
|
|
<property>
|
|
<name>baseURL</name>
|
|
<description>The URL to access the community APIs</description>
|
|
</property>
|
|
<property>
|
|
<name>startFrom></name>
|
|
<value>undelete</value>
|
|
</property>
|
|
|
|
</parameters>
|
|
|
|
<global>
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
<name-node>${nameNode}</name-node>
|
|
<configuration>
|
|
<property>
|
|
<name>oozie.action.sharelib.for.spark</name>
|
|
<value>${oozieActionShareLibForSpark2}</value>
|
|
</property>
|
|
</configuration>
|
|
</global>
|
|
|
|
<start to="startFrom"/>
|
|
|
|
<kill name="Kill">
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
</kill>
|
|
|
|
<decision name="startFrom">
|
|
<switch>
|
|
<case to="exec_bulktag">${wf:conf('startFrom') eq 'undelete'}</case>
|
|
|
|
<default to="reset_outputpath"/>
|
|
</switch>
|
|
</decision>
|
|
|
|
<action name="reset_outputpath">
|
|
<fs>
|
|
<delete path="${workingDir}"/>
|
|
<mkdir path="${workingDir}"/>
|
|
</fs>
|
|
<ok to="exec_bulktag"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="exec_bulktag">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn-cluster</master>
|
|
<mode>cluster</mode>
|
|
<name>bulkTagging</name>
|
|
<class>eu.dnetlib.dhp.bulktag.SparkBulkTagJob</class>
|
|
<jar>dhp-enrichment-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--num-executors=${sparkExecutorNumber}
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--executor-cores=${sparkExecutorCores}
|
|
--driver-memory=${sparkDriverMemory}
|
|
--conf spark.executor.memoryOverhead=${memoryOverhead}
|
|
--conf spark.sql.shuffle.partitions=${partitions}
|
|
--conf spark.extraListeners=${spark2ExtraListeners}
|
|
--conf spark.sql.queryExecutionListeners=${spark2SqlQueryExecutionListeners}
|
|
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
|
|
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
|
|
</spark-opts>
|
|
<arg>--sourcePath</arg><arg>${sourcePath}/</arg>
|
|
<arg>--outputPath</arg><arg>${workingDir}/bulktag/</arg>
|
|
<arg>--pathMap</arg><arg>${pathMap}</arg>
|
|
<arg>--baseURL</arg><arg>${baseURL}</arg>
|
|
</spark>
|
|
<ok to="End"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
|
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app> |