2024-03-20 17:04:52 +01:00
|
|
|
<workflow-app name="generate_crossref_Datasource" xmlns="uri:oozie:workflow:0.5">
|
|
|
|
<parameters>
|
|
|
|
<property>
|
|
|
|
<name>sourcePath</name>
|
2024-03-25 18:18:10 +01:00
|
|
|
<description>The base path of Crossref DUMP </description>
|
2024-03-20 17:04:52 +01:00
|
|
|
</property>
|
2024-03-25 18:18:10 +01:00
|
|
|
<property>
|
|
|
|
<name>unpaywallPath</name>
|
|
|
|
<description>The base path of unpaywall DUMP </description>
|
2024-03-20 17:04:52 +01:00
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>isLookupUrl</name>
|
|
|
|
<description>The Information service Lookup URL</description>
|
|
|
|
</property>
|
2024-04-11 17:27:49 +02:00
|
|
|
<property>
|
|
|
|
<name>mdStoreOutputId</name>
|
|
|
|
<description>the identifier of the cleaned MDStore</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>mdStoreManagerURI</name>
|
|
|
|
<description>the path of the cleaned mdstore</description>
|
|
|
|
</property>
|
2024-03-20 17:04:52 +01:00
|
|
|
</parameters>
|
|
|
|
|
2024-04-11 17:27:49 +02:00
|
|
|
<start to="StartTransaction"/>
|
2024-03-20 17:04:52 +01:00
|
|
|
|
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
|
|
|
|
2024-04-11 17:27:49 +02:00
|
|
|
<action name="StartTransaction">
|
|
|
|
<java>
|
|
|
|
<configuration>
|
|
|
|
<property>
|
|
|
|
<name>oozie.launcher.mapreduce.user.classpath.first</name>
|
|
|
|
<value>true</value>
|
|
|
|
</property>
|
|
|
|
</configuration>
|
|
|
|
<main-class>eu.dnetlib.dhp.aggregation.mdstore.MDStoreActionNode</main-class>
|
|
|
|
<arg>--action</arg><arg>NEW_VERSION</arg>
|
|
|
|
<arg>--mdStoreID</arg><arg>${mdStoreOutputId}</arg>
|
|
|
|
<arg>--mdStoreManagerURI</arg><arg>${mdStoreManagerURI}</arg>
|
|
|
|
<capture-output/>
|
|
|
|
</java>
|
|
|
|
<ok to="generateOAF"/>
|
|
|
|
<error to="EndReadRollBack"/>
|
|
|
|
</action>
|
2024-03-20 17:04:52 +01:00
|
|
|
|
|
|
|
<action name="generateOAF">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>Crossref TO OAF</name>
|
|
|
|
<class>eu.dnetlib.dhp.collection.crossref.SparkMapDumpIntoOAF</class>
|
|
|
|
<jar>dhp-aggregation-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>
|
|
|
|
--executor-memory=${sparkExecutorMemory}
|
|
|
|
--executor-cores=${sparkExecutorCores}
|
|
|
|
--driver-memory=${sparkDriverMemory}
|
|
|
|
--conf spark.executor.memoryOverhead=2g
|
|
|
|
--conf spark.sql.shuffle.partitions=3000
|
|
|
|
--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>
|
2024-03-25 18:18:10 +01:00
|
|
|
<arg>--unpaywallPath</arg><arg>${unpaywallPath}</arg>
|
2024-04-11 17:27:49 +02:00
|
|
|
<arg>--mdstoreOutputVersion</arg><arg>${wf:actionData('StartTransaction')['mdStoreVersion']}</arg>
|
2024-03-20 17:04:52 +01:00
|
|
|
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
|
|
|
<arg>--master</arg><arg>yarn</arg>
|
|
|
|
</spark>
|
2024-04-11 17:27:49 +02:00
|
|
|
<ok to="CommitVersion"/>
|
|
|
|
<error to="RollBack"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="CommitVersion">
|
|
|
|
<java>
|
|
|
|
<configuration>
|
|
|
|
<property>
|
|
|
|
<name>oozie.launcher.mapreduce.user.classpath.first</name>
|
|
|
|
<value>true</value>
|
|
|
|
</property>
|
|
|
|
</configuration>
|
|
|
|
<main-class>eu.dnetlib.dhp.aggregation.mdstore.MDStoreActionNode</main-class>
|
|
|
|
<arg>--action</arg><arg>COMMIT</arg>
|
|
|
|
<arg>--namenode</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>--mdStoreVersion</arg><arg>${wf:actionData('StartTransaction')['mdStoreVersion']}</arg>
|
|
|
|
<arg>--mdStoreManagerURI</arg><arg>${mdStoreManagerURI}</arg>
|
|
|
|
</java>
|
2024-03-20 17:04:52 +01:00
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2024-04-11 17:27:49 +02:00
|
|
|
<action name="EndReadRollBack">
|
|
|
|
<java>
|
|
|
|
<configuration>
|
|
|
|
<property>
|
|
|
|
<name>oozie.launcher.mapreduce.user.classpath.first</name>
|
|
|
|
<value>true</value>
|
|
|
|
</property>
|
|
|
|
</configuration>
|
|
|
|
<main-class>eu.dnetlib.dhp.aggregation.mdstore.MDStoreActionNode</main-class>
|
|
|
|
<arg>--action</arg><arg>READ_UNLOCK</arg>
|
|
|
|
<arg>--mdStoreManagerURI</arg><arg>${mdStoreManagerURI}</arg>
|
|
|
|
<arg>--readMDStoreId</arg><arg>${wf:actionData('BeginRead')['mdStoreReadLockVersion']}</arg>
|
|
|
|
<capture-output/>
|
|
|
|
</java>
|
|
|
|
<ok to="RollBack"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="RollBack">
|
|
|
|
<java>
|
|
|
|
<configuration>
|
|
|
|
<property>
|
|
|
|
<name>oozie.launcher.mapreduce.user.classpath.first</name>
|
|
|
|
<value>true</value>
|
|
|
|
</property>
|
|
|
|
</configuration>
|
|
|
|
<main-class>eu.dnetlib.dhp.aggregation.mdstore.MDStoreActionNode</main-class>
|
|
|
|
<arg>--action</arg><arg>ROLLBACK</arg>
|
|
|
|
<arg>--mdStoreVersion</arg><arg>${wf:actionData('StartTransaction')['mdStoreVersion']}</arg>
|
|
|
|
<arg>--mdStoreManagerURI</arg><arg>${mdStoreManagerURI}</arg>
|
|
|
|
</java>
|
|
|
|
<ok to="Kill"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2024-03-20 17:04:52 +01:00
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app>
|