2020-02-17 12:31:44 +01:00
|
|
|
<workflow-app name="import Entities from aggretor to HDFS" xmlns="uri:oozie:workflow:0.5">
|
|
|
|
<parameters>
|
|
|
|
<property>
|
|
|
|
<name>workingPath</name>
|
|
|
|
<description>the base path to store hdfs file</description>
|
|
|
|
</property>
|
|
|
|
<property>
|
|
|
|
<name>graphRawPath</name>
|
|
|
|
<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>
|
|
|
|
<name>mongourl</name>
|
|
|
|
<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-19 15:11:17 +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>
|
|
|
|
<delete path='${workingPath}'/>
|
|
|
|
<mkdir path='${workingPath}'/>
|
|
|
|
</fs>
|
|
|
|
<ok to="ImportEntitiesFromPostgres"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="ImportEntitiesFromPostgres">
|
|
|
|
<java>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<main-class>eu.dnetlib.dhp.migration.MigrateDbEntitiesApplication</main-class>
|
|
|
|
<arg>-p</arg><arg>${workingPath}/db_entities</arg>
|
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-u</arg><arg>${hdfsUser}</arg>
|
|
|
|
<arg>-dburl</arg><arg>${postgresURL}</arg>
|
|
|
|
<arg>-dbuser</arg><arg>${postgresUser}</arg>
|
|
|
|
<arg>-dbpasswd</arg><arg>${postgresPassword}</arg>
|
|
|
|
</java>
|
2020-02-19 15:11:17 +01:00
|
|
|
<ok to="ImportClaimsFromPostgres"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="ImportClaimsFromPostgres">
|
|
|
|
<java>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<main-class>eu.dnetlib.dhp.migration.MigrateDbEntitiesApplication</main-class>
|
|
|
|
<arg>-p</arg><arg>${workingPath}/db_claims</arg>
|
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-u</arg><arg>${hdfsUser}</arg>
|
|
|
|
<arg>-dburl</arg><arg>${postgresURL}</arg>
|
|
|
|
<arg>-dbuser</arg><arg>${postgresUser}</arg>
|
|
|
|
<arg>-dbpasswd</arg><arg>${postgresPassword}</arg>
|
|
|
|
<arg>-a</arg><arg>claims</arg>
|
|
|
|
</java>
|
2020-02-17 12:31:44 +01:00
|
|
|
<ok to="ImportODFEntitiesFromMongoDB"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="ImportODFEntitiesFromMongoDB">
|
|
|
|
<java>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<main-class>eu.dnetlib.dhp.migration.MigrateMongoMdstoresApplication</main-class>
|
|
|
|
<arg>-p</arg><arg>${workingPath}/odf_entities</arg>
|
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-u</arg><arg>${hdfsUser}</arg>
|
|
|
|
<arg>-mongourl</arg><arg>${mongourl}</arg>
|
|
|
|
<arg>-db</arg><arg>${mongoDb}</arg>
|
|
|
|
<arg>-f</arg><arg>ODF</arg>
|
|
|
|
<arg>-l</arg><arg>store</arg>
|
|
|
|
<arg>-i</arg><arg>cleaned</arg>
|
|
|
|
<arg>-pgurl</arg><arg>${postgresURL}</arg>
|
|
|
|
<arg>-pguser</arg><arg>${postgresUser}</arg>
|
|
|
|
<arg>-pgpasswd</arg><arg>${postgresPassword}</arg>
|
|
|
|
</java>
|
|
|
|
<ok to="ImportOAFEntitiesFromMongoDB"/>
|
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
|
|
|
<action name="ImportOAFEntitiesFromMongoDB">
|
|
|
|
<java>
|
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
|
|
|
<main-class>eu.dnetlib.dhp.migration.MigrateMongoMdstoresApplication</main-class>
|
|
|
|
<arg>-p</arg><arg>${workingPath}/oaf_entities</arg>
|
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-u</arg><arg>${hdfsUser}</arg>
|
|
|
|
<arg>-mongourl</arg><arg>${mongourl}</arg>
|
|
|
|
<arg>-db</arg><arg>${mongoDb}</arg>
|
|
|
|
<arg>-f</arg><arg>OAF</arg>
|
|
|
|
<arg>-l</arg><arg>store</arg>
|
|
|
|
<arg>-i</arg><arg>cleaned</arg>
|
|
|
|
<arg>-pgurl</arg><arg>${postgresURL}</arg>
|
|
|
|
<arg>-pguser</arg><arg>${postgresUser}</arg>
|
|
|
|
<arg>-pgpasswd</arg><arg>${postgresPassword}</arg>
|
|
|
|
</java>
|
2020-02-19 15:11:17 +01:00
|
|
|
<ok to="ImportODFClaimsFromMongoDB"/>
|
2020-02-17 12:31:44 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
2020-02-19 15:11:17 +01:00
|
|
|
|
|
|
|
<action name="ImportODFClaimsFromMongoDB">
|
|
|
|
<java>
|
2020-02-17 12:31:44 +01:00
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
2020-02-19 15:11:17 +01:00
|
|
|
<main-class>eu.dnetlib.dhp.migration.MigrateMongoMdstoresApplication</main-class>
|
|
|
|
<arg>-p</arg><arg>${workingPath}/odf_claims</arg>
|
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-u</arg><arg>${hdfsUser}</arg>
|
|
|
|
<arg>-mongourl</arg><arg>${mongourl}</arg>
|
|
|
|
<arg>-db</arg><arg>${mongoDb}</arg>
|
|
|
|
<arg>-f</arg><arg>ODF</arg>
|
|
|
|
<arg>-l</arg><arg>store</arg>
|
|
|
|
<arg>-i</arg><arg>claim</arg>
|
|
|
|
<arg>-pgurl</arg><arg>${postgresURL}</arg>
|
|
|
|
<arg>-pguser</arg><arg>${postgresUser}</arg>
|
|
|
|
<arg>-pgpasswd</arg><arg>${postgresPassword}</arg>
|
|
|
|
</java>
|
|
|
|
<ok to="ImportOAFClaimsFromMongoDB"/>
|
2020-02-17 12:31:44 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-02-19 15:11:17 +01:00
|
|
|
<action name="ImportOAFClaimsFromMongoDB">
|
|
|
|
<java>
|
2020-02-17 12:31:44 +01:00
|
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
|
|
<name-node>${nameNode}</name-node>
|
2020-02-19 15:11:17 +01:00
|
|
|
<main-class>eu.dnetlib.dhp.migration.MigrateMongoMdstoresApplication</main-class>
|
|
|
|
<arg>-p</arg><arg>${workingPath}/oaf_claims</arg>
|
|
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
|
|
<arg>-u</arg><arg>${hdfsUser}</arg>
|
|
|
|
<arg>-mongourl</arg><arg>${mongourl}</arg>
|
|
|
|
<arg>-db</arg><arg>${mongoDb}</arg>
|
|
|
|
<arg>-f</arg><arg>OAF</arg>
|
|
|
|
<arg>-l</arg><arg>store</arg>
|
|
|
|
<arg>-i</arg><arg>claim</arg>
|
|
|
|
<arg>-pgurl</arg><arg>${postgresURL}</arg>
|
|
|
|
<arg>-pguser</arg><arg>${postgresUser}</arg>
|
|
|
|
<arg>-pgpasswd</arg><arg>${postgresPassword}</arg>
|
|
|
|
</java>
|
|
|
|
<ok to="ExtractEntities"/>
|
2020-02-17 12:31:44 +01:00
|
|
|
<error to="Kill"/>
|
|
|
|
</action>
|
|
|
|
|
2020-02-19 15:11:17 +01:00
|
|
|
<action name="ExtractEntities">
|
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-02-19 15:11:17 +01:00
|
|
|
<name>ExtractEntities</name>
|
2020-02-17 12:31:44 +01:00
|
|
|
<class>eu.dnetlib.dhp.migration.ExtractEntitiesFromHDFSJob</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>
|
2020-02-19 15:11:17 +01:00
|
|
|
<arg>-s</arg><arg>${workingPath}/db_entities,${workingPath}/oaf_entities,${workingPath}/odf_entities</arg>
|
|
|
|
<arg>-g</arg><arg>${graphRawPath}</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>
|