forked from D-Net/dnet-hadoop
187 lines
7.4 KiB
XML
187 lines
7.4 KiB
XML
<workflow-app name="Transformation_Workflow" xmlns="uri:oozie:workflow:0.5">
|
|
<parameters>
|
|
<property>
|
|
<name>mdStoreInputId</name>
|
|
<description>the identifier of the native MDStore</description>
|
|
</property>
|
|
<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>
|
|
<property>
|
|
<name>transformationRuleId</name>
|
|
<description>The transformation Rule to apply</description>
|
|
</property>
|
|
<property>
|
|
<name>transformationPlugin</name>
|
|
<value>XSLT_TRANSFORM</value>
|
|
<description>The transformation Plugin</description>
|
|
</property>
|
|
<property>
|
|
<name>dateOfTransformation</name>
|
|
<description>The timestamp of the transformation date</description>
|
|
</property>
|
|
<property>
|
|
<name>isLookupUrl</name>
|
|
<description>The IS lookUp service endopoint</description>
|
|
</property>
|
|
<property>
|
|
<name>workflowId</name>
|
|
<description>The identifier of the workflow</description>
|
|
</property>
|
|
<property>
|
|
<name>dnetMessageManagerURL</name>
|
|
<description>The URI of the Dnet Message Manager</description>
|
|
</property>
|
|
</parameters>
|
|
|
|
<start to="BeginRead"/>
|
|
|
|
<kill name="Kill">
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
</kill>
|
|
|
|
<action name="BeginRead">
|
|
<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_LOCK</arg>
|
|
<arg>--mdStoreID</arg><arg>${mdStoreInputId}</arg>
|
|
<arg>--mdStoreManagerURI</arg><arg>${mdStoreManagerURI}</arg>
|
|
<capture-output/>
|
|
</java>
|
|
<ok to="StartTransaction"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<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="TransformJob"/>
|
|
<error to="EndReadRollBack"/>
|
|
</action>
|
|
|
|
<action name="TransformJob">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn</master>
|
|
<mode>cluster</mode>
|
|
<name>Transform MetadataStore</name>
|
|
<class>eu.dnetlib.dhp.transformation.TransformSparkJobNode</class>
|
|
<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>--mdstoreOutputVersion</arg><arg>${wf:actionData('StartTransaction')['mdStoreVersion']}</arg>
|
|
<arg>--mdstoreInputVersion</arg><arg>${wf:actionData('BeginRead')['mdStoreReadLockVersion']}</arg>
|
|
<arg>--dateOfTransformation</arg><arg>${dateOfTransformation}</arg>
|
|
<arg>--transformationPlugin</arg><arg>${transformationPlugin}</arg>
|
|
<arg>--transformationRuleId</arg><arg>${transformationRuleId}</arg>
|
|
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
|
<arg>--workflowId</arg><arg>${workflowId}</arg>
|
|
<arg>--dnetMessageManagerURL</arg><arg>${dnetMessageManagerURL}</arg>
|
|
</spark>
|
|
<ok to="EndRead"/>
|
|
<error to="EndReadRollBack"/>
|
|
</action>
|
|
|
|
<action name="EndRead">
|
|
<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="CommitVersion"/>
|
|
<error to="Kill"/>
|
|
</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>
|
|
<ok to="End"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<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>
|
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app> |