forked from D-Net/dnet-hadoop
81 lines
3.0 KiB
XML
81 lines
3.0 KiB
XML
<workflow-app name="BioSchemaHarvester" xmlns="uri:oozie:workflow:0.5">
|
|
<parameters>
|
|
<property>
|
|
<name>workingPath</name>
|
|
<value>/data/bioschema/mobidb/</value>
|
|
<description>the working path</description>
|
|
</property>
|
|
<property>
|
|
<name>sitemapUrl</name>
|
|
<value>https://mobidb.org/sitemap2.xml.gz</value>
|
|
</property>
|
|
<property>
|
|
<name>sitemapURLKey</name>
|
|
<value>loc</value>
|
|
</property>
|
|
<property>
|
|
<name>dynamic</name>
|
|
<value>true</value>
|
|
<description>the dynamic boolean determines if the scraper should start using selenium or JSOUP to scrape the information (dynamic and static respectively)</description>
|
|
</property>
|
|
<property>
|
|
<name>maxScrapedPages</name>
|
|
<value>5</value>
|
|
<description>max number of pages that will be scraped, default: no limit</description>
|
|
</property>
|
|
<property>
|
|
<name>rdfOutput</name>
|
|
<value>nquads.seq</value>
|
|
<description>rdf output of scraping step</description>
|
|
</property>
|
|
<property>
|
|
<name>scraping_java_opts</name>
|
|
<value>-Xmx4g -Dwebdriver.chrome.whitelistedIps=</value>
|
|
<description>Used to configure the heap size for the map JVM process. Should be 80% of mapreduce.map.memory.mb.</description>
|
|
</property>
|
|
</parameters>
|
|
|
|
<global>
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
<name-node>${nameNode}</name-node>
|
|
</global>
|
|
|
|
<start to="ResetWorkingPath"/>
|
|
<kill name="Kill">
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
</kill>
|
|
|
|
<action name="ResetWorkingPath">
|
|
<fs>
|
|
<delete path='${workingPath}${rdfOutput}'/>
|
|
</fs>
|
|
<ok to="bmuseScraping"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="bmuseScraping">
|
|
<java>
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
<name-node>${nameNode}</name-node>
|
|
<configuration>
|
|
<property>
|
|
<name>oozie.launcher.mapreduce.user.classpath.first</name>
|
|
<value>true</value>
|
|
</property>
|
|
</configuration>
|
|
<main-class>eu.dnetlib.dhp.bmuse.bioschema.ScrapingJob</main-class>
|
|
<java-opts>${scraping_java_opts}</java-opts>
|
|
<arg>--nameNode</arg><arg>${nameNode}</arg>
|
|
<arg>--workingPath</arg><arg>${workingPath}</arg>
|
|
<arg>--rdfOutput</arg><arg>${rdfOutput}</arg>
|
|
<arg>--sitemapUrl</arg><arg>${sitemapUrl}</arg>
|
|
<arg>--sitemapURLKey</arg><arg>${sitemapURLKey}</arg>
|
|
<arg>--dynamic</arg><arg>${dynamic}</arg>
|
|
<arg>--maxScrapedPages</arg><arg>${maxScrapedPages}</arg>
|
|
</java>
|
|
<ok to="End"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<end name="End"/>
|
|
</workflow-app> |