forked from D-Net/dnet-hadoop
73 lines
2.4 KiB
XML
73 lines
2.4 KiB
XML
<workflow-app name="import Entities from aggretor to HDFS" xmlns="uri:oozie:workflow:0.5">
|
|
<parameters>
|
|
<property>
|
|
<name>workingPath</name>
|
|
<description>the working dir base path</description>
|
|
</property>
|
|
<property>
|
|
<name>targetPath</name>
|
|
<description>the graph Raw base path</description>
|
|
</property>
|
|
<property>
|
|
<name>format</name>
|
|
<description>the postgres URL to access to the database</description>
|
|
</property>
|
|
<property>
|
|
<name>layout</name>
|
|
<description>the user postgres</description>
|
|
</property>
|
|
<property>
|
|
<name>interpretation</name>
|
|
<description>the password postgres</description>
|
|
</property>
|
|
<property>
|
|
<name>dbhost</name>
|
|
<description>mongoDB url, example: mongodb://[username:password@]host[:port]</description>
|
|
</property>
|
|
<property>
|
|
<name>dbName</name>
|
|
<description>mongo database</description>
|
|
</property>
|
|
<property>
|
|
<name>user</name>
|
|
<description>HDFS user</description>
|
|
</property>
|
|
</parameters>
|
|
|
|
<start to="ResetWorkingPath"/>
|
|
|
|
|
|
<kill name="Kill">
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
</kill>
|
|
|
|
<action name="ResetWorkingPath">
|
|
<fs>
|
|
<delete path='${targetPath}'/>
|
|
<mkdir path='${workingPath}'/>
|
|
</fs>
|
|
<ok to="ImportEntitiesFromMongo"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
|
|
<action name="ImportEntitiesFromMongo">
|
|
<java>
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
<name-node>${nameNode}</name-node>
|
|
<main-class>eu.dnetlib.dhp.graph.ImportDataFromMongo</main-class>
|
|
<arg>-t</arg><arg>${targetPath}</arg>
|
|
<arg>-n</arg><arg>${nameNode}</arg>
|
|
<arg>-u</arg><arg>${user}</arg>
|
|
<arg>-h</arg><arg>${dbhost}</arg>
|
|
<arg>-p</arg><arg>27017</arg>
|
|
<arg>-dn</arg><arg>${dbName}</arg>
|
|
<arg>-f</arg><arg>${format}</arg>
|
|
<arg>-l</arg><arg>${layout}</arg>
|
|
<arg>-i</arg><arg>${interpretation}</arg>
|
|
</java>
|
|
<ok to="End"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
<end name="End"/>
|
|
</workflow-app> |