forked from D-Net/dnet-hadoop
113 lines
4.6 KiB
XML
113 lines
4.6 KiB
XML
<workflow-app name="Index Scholexplorer Infospace" xmlns="uri:oozie:workflow:0.5">
|
|
<parameters>
|
|
<property>
|
|
<name>sourcePath</name>
|
|
<description>the sourcePath of the json RDDs</description>
|
|
</property>
|
|
<property>
|
|
<name>isLookupUrl</name>
|
|
<description>URL for the isLookup service</description>
|
|
</property>
|
|
<property>
|
|
<name>solrDeletionQuery</name>
|
|
<value>*:*</value>
|
|
<description>query used in the deleted by query operation</description>
|
|
</property>
|
|
<property>
|
|
<name>format</name>
|
|
<description>metadata format name (SMF)</description>
|
|
</property>
|
|
|
|
</parameters>
|
|
|
|
<start to="indexScholix"/>
|
|
|
|
<kill name="Kill">
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
</kill>
|
|
|
|
<action name="drop_solr_collection">
|
|
<java>
|
|
<configuration>
|
|
<property>
|
|
<name>oozie.launcher.mapreduce.user.classpath.first</name>
|
|
<value>true</value>
|
|
</property>
|
|
</configuration>
|
|
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
|
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
|
<arg>--format</arg><arg>${format}</arg>
|
|
<arg>--action</arg><arg>DELETE_BY_QUERY</arg>
|
|
<arg>--query</arg><arg>${solrDeletionQuery}</arg>
|
|
<arg>--commit</arg><arg>true</arg>
|
|
</java>
|
|
<ok to="create_solr_index"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="create_solr_index">
|
|
<java>
|
|
<configuration>
|
|
<property>
|
|
<name>oozie.launcher.mapreduce.user.classpath.first</name>
|
|
<value>true</value>
|
|
</property>
|
|
</configuration>
|
|
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
|
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
|
<arg>--format</arg><arg>${format}</arg>
|
|
<arg>--action</arg><arg>CREATE</arg>
|
|
|
|
</java>
|
|
<ok to="indexScholix"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="indexScholix">
|
|
<spark xmlns="uri:oozie:spark-action:0.2">
|
|
<master>yarn</master>
|
|
<mode>cluster</mode>
|
|
<name>Index summary</name>
|
|
<class>eu.dnetlib.dhp.sx.provision.SparkIndexCollectionOnSOLR</class>
|
|
<jar>dhp-graph-provision-${projectVersion}.jar</jar>
|
|
<spark-opts>
|
|
--conf spark.dynamicAllocation.enabled=true
|
|
--conf spark.shuffle.service.enabled=true
|
|
--executor-memory=${sparkExecutorMemory}
|
|
--conf spark.dynamicAllocation.maxExecutors="16"
|
|
--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>--cluster</arg><arg>yarn</arg>
|
|
<arg>--isURL</arg><arg>${isLookupUrl}</arg>
|
|
<arg>--inputPath</arg><arg>${sourcePath}</arg>
|
|
<arg>--format</arg><arg>${format}</arg>
|
|
|
|
</spark>
|
|
<ok to="commit_solr_collection"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="commit_solr_collection">
|
|
<java>
|
|
<configuration>
|
|
<property>
|
|
<name>oozie.launcher.mapreduce.user.classpath.first</name>
|
|
<value>true</value>
|
|
</property>
|
|
</configuration>
|
|
<main-class>eu.dnetlib.dhp.oa.provision.SolrAdminApplication</main-class>
|
|
<arg>--isLookupUrl</arg><arg>${isLookupUrl}</arg>
|
|
<arg>--format</arg><arg>${format}</arg>
|
|
<arg>--action</arg><arg>COMMIT</arg>
|
|
</java>
|
|
<ok to="End"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
|
|
<end name="End"/>
|
|
</workflow-app> |