2019-04-11 15:39:29 +02:00
|
|
|
<workflow-app name="CollectionWorkflow" xmlns="uri:oozie:workflow:0.5">
|
2019-03-25 15:18:31 +01:00
|
|
|
<parameters>
|
|
|
|
<property>
|
|
|
|
<name>mdStorePath</name>
|
|
|
|
<description>the path of the native mdstore</description>
|
|
|
|
</property>
|
|
|
|
|
|
|
|
<property>
|
|
|
|
<name>apiDescription</name>
|
|
|
|
<description>A json encoding of the API Description class</description>
|
|
|
|
</property>
|
|
|
|
|
|
|
|
<property>
|
|
|
|
<name>dataSourceInfo</name>
|
|
|
|
<description>A json encoding of the Datasource Info</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
2019-04-11 15:39:29 +02:00
|
|
|
<name>identifierPath</name>
|
2019-03-25 15:18:31 +01:00
|
|
|
<description>An xpath to retrieve the metadata idnentifier for the generation of DNet Identifier </description>
|
|
|
|
</property>
|
|
|
|
|
|
|
|
<property>
|
|
|
|
<name>metadataEncoding</name>
|
|
|
|
<description> The type of the metadata XML/JSON</description>
|
|
|
|
</property>
|
|
|
|
|
|
|
|
<property>
|
|
|
|
<name>timestamp</name>
|
|
|
|
<description>The timestamp of the collection date</description>
|
|
|
|
</property>
|
2019-04-11 15:39:29 +02:00
|
|
|
|
|
|
|
<property>
|
|
|
|
<name>workflowId</name>
|
|
|
|
<description>The identifier of the workflow</description>
|
|
|
|
</property>
|
2019-03-25 15:18:31 +01:00
|
|
|
</parameters>
|
2021-01-28 09:51:17 +01:00
|
|
|
<global>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
</global>
|
2019-03-25 15:18:31 +01:00
|
|
|
|
2021-01-28 09:51:17 +01:00
|
|
|
<start to="CollectionWorker"/>
|
2019-03-18 10:44:35 +01:00
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
2021-01-28 09:51:17 +01:00
|
|
|
|
2019-03-18 10:44:35 +01:00
|
|
|
<action name="CollectionWorker">
|
2019-10-24 11:36:59 +02:00
|
|
|
<java>
|
2021-01-28 09:51:17 +01:00
|
|
|
<main-class>eu.dnetlib.dhp.collection.worker.CollectorWorkerApplication</main-class>
|
|
|
|
<arg>--hdfsPath</arg><arg>${workingDir}/sequenceFile_${mdstoreVersion}</arg>
|
|
|
|
<arg>--apidescriptor</arg><arg>${apiDescription}</arg>
|
|
|
|
<arg>--namenode</arg><arg>${nameNode}</arg>
|
2019-10-24 11:36:59 +02:00
|
|
|
</java>
|
2019-04-11 15:39:29 +02:00
|
|
|
<ok to="GenerateNativeStoreSparkJob"/>
|
2019-03-18 10:44:35 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2021-01-28 09:51:17 +01:00
|
|
|
|
2019-04-11 15:39:29 +02:00
|
|
|
<action name="GenerateNativeStoreSparkJob">
|
2019-03-18 10:44:35 +01:00
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
2021-01-28 09:51:17 +01:00
|
|
|
<name>Generate Native MetadataStore</name>
|
2019-03-18 10:44:35 +01:00
|
|
|
<class>eu.dnetlib.dhp.collection.GenerateNativeStoreSparkJob</class>
|
2021-01-28 09:51:17 +01:00
|
|
|
<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}
|
|
|
|
</spark-opts>
|
|
|
|
<arg>--encoding</arg><arg>${metadataEncoding}</arg>
|
|
|
|
<arg>--dateOfCollection</arg><arg>${timestamp}</arg>
|
|
|
|
<arg>--provenance</arg><arg>${dataSourceInfo}</arg>
|
2019-03-25 15:18:31 +01:00
|
|
|
<arg>--xpath</arg><arg>${identifierPath}</arg>
|
2021-01-28 09:51:17 +01:00
|
|
|
<arg>--input</arg><arg>${workingDir}/sequenceFile</arg>
|
2019-03-25 15:18:31 +01:00
|
|
|
<arg>--output</arg><arg>${mdStorePath}</arg>
|
2019-04-11 15:39:29 +02:00
|
|
|
<arg>-w</arg><arg>${workflowId}</arg>
|
2019-03-18 10:44:35 +01:00
|
|
|
</spark>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2019-04-11 15:39:29 +02:00
|
|
|
|
2019-03-18 10:44:35 +01:00
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app>
|