dnet-hadoop/dhp-workflows/dhp-rdfconverter/src/main/resources/eu/dnetlib/dhp/rdfconverter/bioschema/oozie_app/workflow.xml

118 lines
4.4 KiB
XML

<workflow-app name="RdfConverter" xmlns="uri:oozie:workflow:0.5">
<parameters>
<property>
<name>bioschemas_datasource_key</name>
<value>mobidb</value>
<description>bioschemas datasource key (i.e. mobidb, ped, disprot)</description>
</property>
<property>
<name>workingPath</name>
<value>/data/bioschema/mobidb/</value>
<description>the working path</description>
</property>
<property>
<name>rdfInput</name>
<value>base64_gzipped_nquads.txt</value>
<description>rdf output of scraping workflow</description>
</property>
<property>
<name>output</name>
<value>json-datacite/</value>
</property>
<property>
<name>profile</name>
<value>Protein</value>
<description>the input data profile that has to be used for conversion (https://bioschemas.org/profiles/)</description>
</property>
<property>
<name>oozie.launcher.mapreduce.map.java.opts</name>
<value>-Xmx4g</value>
</property>
<property>
<name>spark2RdfConversionMaxExecutors</name>
<value>50</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>4</value>
<description>number of cores used by single executor</description>
</property>
<property>
<name>spark2ExtraListeners</name>
<value>com.cloudera.spark.lineage.NavigatorAppListener</value>
<description>spark 2.* extra 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>
</parameters>
<start to="DownloadNQuads"/>
<kill name="Kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<action name="DownloadNQuads">
<shell xmlns="uri:oozie:shell-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<exec>download_nquads.sh</exec>
<argument>${bioschemas_datasource_key}</argument>
<file>download_nquads.sh</file>
<capture-output/>
</shell>
<ok to="ResetWorkingPath"/>
<error to="Kill"/>
</action>
<action name="ResetWorkingPath">
<fs>
<delete path='${workingPath}${output}'/>
</fs>
<ok to="NquadsToDataciteJson"/>
<error to="Kill"/>
</action>
<action name="NquadsToDataciteJson">
<spark xmlns="uri:oozie:spark-action:0.2">
<master>yarn-cluster</master>
<mode>cluster</mode>
<name>NquadsToDataciteJson</name>
<class>eu.dnetlib.dhp.rdfconverter.bioschema.SparkRdfToDatacite</class>
<jar>dhp-rdfconverter-${projectVersion}.jar</jar>
<spark-opts>
--executor-cores=${sparkExecutorCores}
--driver-memory=${sparkDriverMemory}
--executor-memory=${sparkExecutorMemory}
--driver-memory=${sparkDriverMemory}
--conf spark.extraListeners=${spark2ExtraListeners}
--conf spark.yarn.historyServer.address=${spark2YarnHistoryServerAddress}
--conf spark.eventLog.dir=${nameNode}${spark2EventLogDir}
</spark-opts>
<arg>--nameNode</arg><arg>${nameNode}</arg>
<arg>--workingPath</arg><arg>${workingPath}</arg>
<arg>--rdfInput</arg><arg>${rdfInput}</arg>
<arg>--output</arg><arg>${output}</arg>
<arg>--profile</arg><arg>${profile}</arg>
</spark>
<ok to="End"/>
<error to="Kill"/>
</action>
<end name="End"/>
</workflow-app>