2020-04-01 18:51:25 +02:00
|
|
|
<workflow-app name="promote_action_payload_for_otherresearchproduct_table" xmlns="uri:oozie:workflow:0.5">
|
|
|
|
<parameters>
|
|
|
|
<property>
|
|
|
|
<name>activePromoteOtherResearchProductActionPayload</name>
|
2020-04-02 11:48:40 +02:00
|
|
|
<description>when true will promote actions with eu.dnetlib.dhp.schema.oaf.OtherResearchProduct payload</description>
|
2020-04-01 18:51:25 +02:00
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>activePromoteResultActionPayload</name>
|
2020-04-02 11:48:40 +02:00
|
|
|
<description>when true will promote actions with eu.dnetlib.dhp.schema.oaf.Result payload</description>
|
2020-04-01 18:51:25 +02:00
|
|
|
</property>
|
|
|
|
<property>
|
2020-04-02 11:48:40 +02:00
|
|
|
<name>inputGraphRootPath</name>
|
|
|
|
<description>root location of input materialized graph</description>
|
2020-04-01 18:51:25 +02:00
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>inputActionPayloadRootPath</name>
|
2020-04-02 11:48:40 +02:00
|
|
|
<description>root location of action payloads to promote</description>
|
2020-04-01 18:51:25 +02:00
|
|
|
</property>
|
|
|
|
<property>
|
2020-04-02 11:48:40 +02:00
|
|
|
<name>outputGraphRootPath</name>
|
|
|
|
<description>root location for output materialized graph</description>
|
2020-04-01 18:51:25 +02:00
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>mergeAndGetStrategy</name>
|
2020-04-02 11:48:40 +02:00
|
|
|
<description>strategy for merging graph table objects with action payload instances, MERGE_FROM_AND_GET or SELECT_NEWER_AND_GET</description>
|
2020-04-01 18:51:25 +02:00
|
|
|
</property>
|
2020-12-07 13:45:18 +01:00
|
|
|
<property>
|
|
|
|
<name>shouldGroupById</name>
|
|
|
|
<description>indicates whether the promotion operation should group objects in the graph by id or not</description>
|
|
|
|
</property>
|
2020-04-01 18:51:25 +02:00
|
|
|
<property>
|
|
|
|
<name>sparkDriverMemory</name>
|
|
|
|
<description>memory for driver process</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>sparkExecutorMemory</name>
|
|
|
|
<description>memory for individual executor</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>sparkExecutorCores</name>
|
|
|
|
<description>number of cores used by single executor</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>oozieActionShareLibForSpark2</name>
|
|
|
|
<description>oozie action sharelib for spark 2.*</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>spark2ExtraListeners</name>
|
|
|
|
<value>com.cloudera.spark.lineage.NavigatorAppListener</value>
|
|
|
|
<description>spark 2.* extra listeners classname</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>spark2SqlQueryExecutionListeners</name>
|
|
|
|
<value>com.cloudera.spark.lineage.NavigatorQueryListener</value>
|
|
|
|
<description>spark 2.* sql query execution 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>
|
|
|
|
|
|
|
|
<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="DecisionPromoteOtherResearchProductActionPayload"/>
|
|
|
|
|
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
|
|
|
|
|
|
|
<decision name="DecisionPromoteOtherResearchProductActionPayload">
|
|
|
|
<switch>
|
|
|
|
<case to="PromoteOtherResearchProductActionPayloadForOtherResearchProductTable">
|
|
|
|
${(activePromoteOtherResearchProductActionPayload eq "true") and
|
2020-04-02 11:48:40 +02:00
|
|
|
(fs:exists(concat(concat(concat(concat(wf:conf('nameNode'),'/'),wf:conf('inputGraphRootPath')),'/'),'otherresearchproduct')) eq "true") and
|
2020-04-01 18:51:25 +02:00
|
|
|
(fs:exists(concat(concat(concat(concat(wf:conf('nameNode'),'/'),wf:conf('inputActionPayloadRootPath')),'/'),'clazz=eu.dnetlib.dhp.schema.oaf.OtherResearchProduct')) eq "true")}
|
|
|
|
</case>
|
|
|
|
<default to="SkipPromoteOtherResearchProductActionPayloadForOtherResearchProductTable"/>
|
|
|
|
</switch>
|
|
|
|
</decision>
|
|
|
|
|
|
|
|
<action name="PromoteOtherResearchProductActionPayloadForOtherResearchProductTable">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>PromoteOtherResearchProductActionPayloadForOtherResearchProductTable</name>
|
|
|
|
<class>eu.dnetlib.dhp.actionmanager.promote.PromoteActionPayloadForGraphTableJob</class>
|
|
|
|
<jar>dhp-actionmanager-${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>
|
2020-04-02 11:48:40 +02:00
|
|
|
<arg>--inputGraphTablePath</arg><arg>${inputGraphRootPath}/otherresearchproduct</arg>
|
2020-04-01 18:51:25 +02:00
|
|
|
<arg>--graphTableClassName</arg><arg>eu.dnetlib.dhp.schema.oaf.OtherResearchProduct</arg>
|
|
|
|
<arg>--inputActionPayloadPath</arg><arg>${inputActionPayloadRootPath}/clazz=eu.dnetlib.dhp.schema.oaf.OtherResearchProduct</arg>
|
|
|
|
<arg>--actionPayloadClassName</arg><arg>eu.dnetlib.dhp.schema.oaf.OtherResearchProduct</arg>
|
|
|
|
<arg>--outputGraphTablePath</arg><arg>${workingDir}/otherresearchproduct</arg>
|
|
|
|
<arg>--mergeAndGetStrategy</arg><arg>${mergeAndGetStrategy}</arg>
|
2020-12-07 13:45:18 +01:00
|
|
|
<arg>--shouldGroupById</arg><arg>${shouldGroupById}</arg>
|
2020-04-01 18:51:25 +02:00
|
|
|
</spark>
|
|
|
|
<ok to="DecisionPromoteResultActionPayloadForOtherResearchProductTable"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="SkipPromoteOtherResearchProductActionPayloadForOtherResearchProductTable">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
2020-04-15 17:56:57 +02:00
|
|
|
<prepare>
|
|
|
|
<delete path="${workingDir}/otherresearchproduct"/>
|
|
|
|
</prepare>
|
2020-04-01 18:51:25 +02:00
|
|
|
<arg>-pb</arg>
|
2020-04-02 11:48:40 +02:00
|
|
|
<arg>${inputGraphRootPath}/otherresearchproduct</arg>
|
2020-04-01 18:51:25 +02:00
|
|
|
<arg>${workingDir}/otherresearchproduct</arg>
|
|
|
|
</distcp>
|
|
|
|
<ok to="DecisionPromoteResultActionPayloadForOtherResearchProductTable"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<decision name="DecisionPromoteResultActionPayloadForOtherResearchProductTable">
|
|
|
|
<switch>
|
|
|
|
<case to="PromoteResultActionPayloadForOtherResearchProductTable">
|
|
|
|
${(activePromoteResultActionPayload eq "true") and
|
|
|
|
(fs:exists(concat(concat(concat(concat(wf:conf('nameNode'),'/'),wf:conf('inputActionPayloadRootPath')),'/'),'clazz=eu.dnetlib.dhp.schema.oaf.Result')) eq "true")}
|
|
|
|
</case>
|
|
|
|
<default to="SkipPromoteResultActionPayloadForOtherResearchProductTable"/>
|
|
|
|
</switch>
|
|
|
|
</decision>
|
|
|
|
|
|
|
|
<action name="PromoteResultActionPayloadForOtherResearchProductTable">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>PromoteResultActionPayloadForOtherResearchProductTable</name>
|
|
|
|
<class>eu.dnetlib.dhp.actionmanager.promote.PromoteActionPayloadForGraphTableJob</class>
|
|
|
|
<jar>dhp-actionmanager-${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}
|
|
|
|
--conf spark.sql.shuffle.partitions=2560
|
|
|
|
</spark-opts>
|
|
|
|
<arg>--inputGraphTablePath</arg><arg>${workingDir}/otherresearchproduct</arg>
|
|
|
|
<arg>--graphTableClassName</arg><arg>eu.dnetlib.dhp.schema.oaf.OtherResearchProduct</arg>
|
|
|
|
<arg>--inputActionPayloadPath</arg><arg>${inputActionPayloadRootPath}/clazz=eu.dnetlib.dhp.schema.oaf.Result</arg>
|
|
|
|
<arg>--actionPayloadClassName</arg><arg>eu.dnetlib.dhp.schema.oaf.Result</arg>
|
2020-04-02 11:48:40 +02:00
|
|
|
<arg>--outputGraphTablePath</arg><arg>${outputGraphRootPath}/otherresearchproduct</arg>
|
2020-04-01 18:51:25 +02:00
|
|
|
<arg>--mergeAndGetStrategy</arg><arg>${mergeAndGetStrategy}</arg>
|
2020-12-07 13:45:18 +01:00
|
|
|
<arg>--shouldGroupById</arg><arg>${shouldGroupById}</arg>
|
2020-04-01 18:51:25 +02:00
|
|
|
</spark>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="SkipPromoteResultActionPayloadForOtherResearchProductTable">
|
|
|
|
<distcp xmlns="uri:oozie:distcp-action:0.2">
|
2020-04-15 17:56:57 +02:00
|
|
|
<prepare>
|
|
|
|
<delete path="${outputGraphRootPath}/otherresearchproduct"/>
|
|
|
|
</prepare>
|
2020-04-01 18:51:25 +02:00
|
|
|
<arg>-pb</arg>
|
|
|
|
<arg>${workingDir}/otherresearchproduct</arg>
|
2020-04-02 11:48:40 +02:00
|
|
|
<arg>${outputGraphRootPath}/otherresearchproduct</arg>
|
2020-04-01 18:51:25 +02:00
|
|
|
</distcp>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app>
|