2020-03-02 16:12:14 +01:00
|
|
|
<workflow-app name="import regular entities as Graph (all steps)" xmlns="uri:oozie:workflow:0.5">
|
2020-02-17 12:31:44 +01:00
|
|
|
<parameters>
|
|
|
|
<property>
|
2020-03-02 16:12:14 +01:00
|
|
|
<name>migrationPathStep1</name>
|
2020-02-17 12:31:44 +01:00
|
|
|
<description>the base path to store hdfs file</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
2020-03-02 16:12:14 +01:00
|
|
|
<name>migrationPathStep2</name>
|
|
|
|
<description>the temporary path to store entities before dispatching</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>migrationPathStep3</name>
|
2020-02-17 12:31:44 +01:00
|
|
|
<description>the graph Raw base path</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>
|
2020-03-02 16:12:14 +01:00
|
|
|
<name>mongoURL</name>
|
2020-02-17 12:31:44 +01:00
|
|
|
<description>mongoDB url, example: mongodb://[username:password@]host[:port]</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>mongoDb</name>
|
|
|
|
<description>mongo database</description>
|
|
|
|
</property>
|
|
|
|
<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>
|
|
|
|
</parameters>
|
|
|
|
|
2020-02-25 15:59:21 +01:00
|
|
|
<start to="ResetWorkingPath"/>
|
2020-02-17 12:31:44 +01:00
|
|
|
|
|
|
|
<kill name="Kill">
|
|
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
|
|
</kill>
|
|
|
|
|
|
|
|
<action name="ResetWorkingPath">
|
|
|
|
<fs>
|
2020-03-02 16:12:14 +01:00
|
|
|
<delete path='${migrationPathStep1}'/>
|
|
|
|
<mkdir path='${migrationPathStep1}'/>
|
2020-02-17 12:31:44 +01:00
|
|
|
</fs>
|
2020-03-02 16:12:14 +01:00
|
|
|
<ok to="ImportDB"/>
|
2020-02-17 12:31:44 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-03-02 16:12:14 +01:00
|
|
|
<action name="ImportDB">
|
2020-02-17 12:31:44 +01:00
|
|
|
<java>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
2020-03-02 16:12:14 +01:00
|
|
|
<main-class>eu.dnetlib.dhp.migration.step1.MigrateDbEntitiesApplication</main-class>
|
|
|
|
<arg>-p</arg><arg>${migrationPathStep1}/db_records</arg>
|
2020-02-17 12:31:44 +01:00
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-u</arg><arg>${hdfsUser}</arg>
|
2020-03-02 16:12:14 +01:00
|
|
|
<arg>-pgurl</arg><arg>${postgresURL}</arg>
|
|
|
|
<arg>-pguser</arg><arg>${postgresUser}</arg>
|
|
|
|
<arg>-pgpasswd</arg><arg>${postgresPassword}</arg>
|
2020-02-17 12:31:44 +01:00
|
|
|
</java>
|
2020-03-02 16:12:14 +01:00
|
|
|
<ok to="ImportODF"/>
|
2020-02-19 15:11:17 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-03-02 16:12:14 +01:00
|
|
|
<action name="ImportODF">
|
2020-02-17 12:31:44 +01:00
|
|
|
<java>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
2020-03-02 16:12:14 +01:00
|
|
|
<main-class>eu.dnetlib.dhp.migration.step1.MigrateMongoMdstoresApplication</main-class>
|
|
|
|
<arg>-p</arg><arg>${migrationPathStep1}/odf_records</arg>
|
2020-02-17 12:31:44 +01:00
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-u</arg><arg>${hdfsUser}</arg>
|
2020-03-02 16:12:14 +01:00
|
|
|
<arg>-mongourl</arg><arg>${mongoURL}</arg>
|
|
|
|
<arg>-mongodb</arg><arg>${mongoDb}</arg>
|
2020-02-17 12:31:44 +01:00
|
|
|
<arg>-f</arg><arg>ODF</arg>
|
|
|
|
<arg>-l</arg><arg>store</arg>
|
|
|
|
<arg>-i</arg><arg>cleaned</arg>
|
|
|
|
</java>
|
2020-03-02 16:12:14 +01:00
|
|
|
<ok to="ImportOAF"/>
|
2020-02-17 12:31:44 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-03-02 16:12:14 +01:00
|
|
|
<action name="ImportOAF">
|
2020-02-17 12:31:44 +01:00
|
|
|
<java>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
2020-03-02 16:12:14 +01:00
|
|
|
<main-class>eu.dnetlib.dhp.migration.step1.MigrateMongoMdstoresApplication</main-class>
|
|
|
|
<arg>-p</arg><arg>${migrationPathStep1}/oaf_records</arg>
|
2020-02-17 12:31:44 +01:00
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-u</arg><arg>${hdfsUser}</arg>
|
2020-03-02 16:12:14 +01:00
|
|
|
<arg>-mongourl</arg><arg>${mongoURL}</arg>
|
|
|
|
<arg>-mongodb</arg><arg>${mongoDb}</arg>
|
2020-02-17 12:31:44 +01:00
|
|
|
<arg>-f</arg><arg>OAF</arg>
|
|
|
|
<arg>-l</arg><arg>store</arg>
|
|
|
|
<arg>-i</arg><arg>cleaned</arg>
|
|
|
|
</java>
|
2020-03-02 16:12:14 +01:00
|
|
|
<ok to="ResetEntities"/>
|
2020-02-17 12:31:44 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2020-02-19 15:11:17 +01:00
|
|
|
|
2020-03-02 16:12:14 +01:00
|
|
|
<action name="ResetEntities">
|
|
|
|
<fs>
|
|
|
|
<delete path='${migrationPathStep2}'/>
|
|
|
|
<mkdir path='${migrationPathStep2}'/>
|
|
|
|
</fs>
|
|
|
|
<ok to="GenerateEntities"/>
|
2020-02-17 12:31:44 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-03-02 16:12:14 +01:00
|
|
|
<action name="GenerateEntities">
|
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
2020-02-17 12:31:44 +01:00
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
2020-03-02 16:12:14 +01:00
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
|
|
|
<name>GenerateEntities</name>
|
|
|
|
<class>eu.dnetlib.dhp.migration.step2.GenerateEntitiesApplication</class>
|
|
|
|
<jar>dhp-aggregation-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>--executor-memory ${sparkExecutorMemory} --executor-cores ${sparkExecutorCores} --driver-memory=${sparkDriverMemory} --conf spark.extraListeners="com.cloudera.spark.lineage.NavigatorAppListener" --conf spark.sql.queryExecutionListeners="com.cloudera.spark.lineage.NavigatorQueryListener" --conf spark.sql.warehouse.dir="/user/hive/warehouse"</spark-opts>
|
|
|
|
<arg>-mt</arg> <arg>yarn-cluster</arg>
|
|
|
|
<arg>-s</arg><arg>${migrationPathStep1}/db_records,${migrationPathStep1}/oaf_records,${migrationPathStep1}/odf_records</arg>
|
|
|
|
<arg>-t</arg><arg>${migrationPathStep2}/all_entities</arg>
|
2020-02-19 15:11:17 +01:00
|
|
|
<arg>-pgurl</arg><arg>${postgresURL}</arg>
|
|
|
|
<arg>-pguser</arg><arg>${postgresUser}</arg>
|
|
|
|
<arg>-pgpasswd</arg><arg>${postgresPassword}</arg>
|
2020-03-02 16:12:14 +01:00
|
|
|
</spark>
|
|
|
|
<ok to="ResetGraph"/>
|
2020-02-17 12:31:44 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-03-02 16:12:14 +01:00
|
|
|
<action name="ResetGraph">
|
2020-02-25 15:59:21 +01:00
|
|
|
<fs>
|
2020-03-02 16:12:14 +01:00
|
|
|
<delete path='${migrationPathStep3}'/>
|
|
|
|
<mkdir path='${migrationPathStep3}'/>
|
2020-02-25 15:59:21 +01:00
|
|
|
</fs>
|
2020-03-02 16:12:14 +01:00
|
|
|
<ok to="GenerateGraph"/>
|
2020-02-25 15:59:21 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-03-02 16:12:14 +01:00
|
|
|
<action name="GenerateGraph">
|
2020-02-17 12:31:44 +01:00
|
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<master>yarn-cluster</master>
|
|
|
|
<mode>cluster</mode>
|
2020-03-02 16:12:14 +01:00
|
|
|
<name>GenerateGraph</name>
|
|
|
|
<class>eu.dnetlib.dhp.migration.step3.DispatchEntitiesApplication</class>
|
2020-02-17 12:31:44 +01:00
|
|
|
<jar>dhp-aggregation-${projectVersion}.jar</jar>
|
|
|
|
<spark-opts>--executor-memory ${sparkExecutorMemory} --executor-cores ${sparkExecutorCores} --driver-memory=${sparkDriverMemory} --conf spark.extraListeners="com.cloudera.spark.lineage.NavigatorAppListener" --conf spark.sql.queryExecutionListeners="com.cloudera.spark.lineage.NavigatorQueryListener" --conf spark.sql.warehouse.dir="/user/hive/warehouse"</spark-opts>
|
|
|
|
<arg>-mt</arg> <arg>yarn-cluster</arg>
|
2020-03-02 16:12:14 +01:00
|
|
|
<arg>-s</arg><arg>${migrationPathStep2}/all_entities</arg>
|
|
|
|
<arg>-g</arg><arg>${migrationPathStep3}</arg>
|
2020-02-17 12:31:44 +01:00
|
|
|
</spark>
|
|
|
|
<ok to="End"/>
|
|
|
|
<error to="Kill"/>
|
2020-02-19 15:11:17 +01:00
|
|
|
</action>
|
2020-02-17 12:31:44 +01:00
|
|
|
|
|
|
|
<end name="End"/>
|
|
|
|
</workflow-app>
|