dnet-hadoop/dhp-workflows/dhp-aggregation/src/main/resources/eu/dnetlib/dhp/collection/plugin/base/oozie_app/workflow.xml

80 lines
3.2 KiB
XML

<workflow-app name="Analyze_BASE_Records" xmlns="uri:oozie:workflow:0.5">
<parameters>
<property>
<name>baseInputPath</name>
<description>the path of the BASE dump</description>
</property>
<property>
<name>baseDataPath</name>
<description>the path where to store BASE records</description>
</property>
<property>
<name>baseReportsPath</name>
<description>path where to store the reports</description>
</property>
<property>
<name>baseOpenDoarReportsPath</name>
<description>path where to store the OpenDOAR reports</description>
</property>
<property>
<name>baseTypesReportPath</name>
<description>path of the generated the types report</description>
</property>
<property>
<name>postgresURL</name>
<description>the postgres URL to access to the database</description>
</property>
<property>
<name>postgresUser</name>
<description>the user postgres</description>
</property>
<property>
<name>postgresPassword</name>
<description>the password postgres</description>
</property>
<property>
<name>baseFromStep</name>
<description>the initial step (numeric, 0 for ALL STEPS)</description>
</property>
</parameters>
<start to="analyzeBaseRecords"/>
<kill name="Kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<action name="analyzeBaseRecords">
<spark xmlns="uri:oozie:spark-action:0.2">
<master>yarn</master>
<mode>cluster</mode>
<name>AnalyzeBaseRecords</name>
<class>eu.dnetlib.dhp.collection.plugin.base.BaseAnalyzerJob</class>
<jar>dhp-aggregation-${projectVersion}.jar</jar>
<spark-opts>
--executor-cores=${sparkExecutorCores}
--executor-memory=${sparkExecutorMemory}
--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=3840
</spark-opts>
<arg>--inputPath</arg><arg>${baseInputPath}</arg>
<arg>--dataPath</arg><arg>${baseDataPath}</arg>
<arg>--outputPath</arg><arg>${baseReportsPath}</arg>
<arg>--opendoarPath</arg><arg>${baseOpenDoarReportsPath}</arg>
<arg>--typesReportPath</arg><arg>${baseTypesReportPath}</arg>
<arg>--postgresUrl</arg><arg>${postgresURL}</arg>
<arg>--postgresUser</arg><arg>${postgresUser}</arg>
<arg>--postgresPassword</arg><arg>${postgresPassword}</arg>
<arg>--fromStep</arg><arg>${baseFromStep}</arg>
</spark>
<ok to="End"/>
<error to="Kill"/>
</action>
<end name="End"/>
</workflow-app>