forked from D-Net/dnet-hadoop
303 lines
10 KiB
XML
303 lines
10 KiB
XML
|
<workflow-app name="Graph Stats" xmlns="uri:oozie:workflow:0.5">
|
||
|
<parameters>
|
||
|
<property>
|
||
|
<name>stats_db_name</name>
|
||
|
<description>the target stats database name</description>
|
||
|
</property>
|
||
|
<property>
|
||
|
<name>stats_db_shadow_name</name>
|
||
|
<description>the name of the shadow schema</description>
|
||
|
</property>
|
||
|
<property>
|
||
|
<name>stats_db_production_name</name>
|
||
|
<description>the name of the production schema</description>
|
||
|
</property>
|
||
|
<property>
|
||
|
<name>hive_metastore_uris</name>
|
||
|
<description>hive server metastore URIs</description>
|
||
|
</property>
|
||
|
<property>
|
||
|
<name>hive_jdbc_url</name>
|
||
|
<description>hive server jdbc url</description>
|
||
|
</property>
|
||
|
<property>
|
||
|
<name>hive_timeout</name>
|
||
|
<description>the time period, in seconds, after which Hive fails a transaction if a Hive client has not sent a hearbeat. The default value is 300 seconds.</description>
|
||
|
</property>
|
||
|
</parameters>
|
||
|
|
||
|
<global>
|
||
|
<job-tracker>${jobTracker}</job-tracker>
|
||
|
<name-node>${nameNode}</name-node>
|
||
|
<configuration>
|
||
|
<property>
|
||
|
<name>hive.metastore.uris</name>
|
||
|
<value>${hive_metastore_uris}</value>
|
||
|
</property>
|
||
|
<property>
|
||
|
<name>hive.txn.timeout</name>
|
||
|
<value>${hive_timeout}</value>
|
||
|
</property>
|
||
|
</configuration>
|
||
|
</global>
|
||
|
|
||
|
<start to="Step1"/>
|
||
|
|
||
|
<kill name="Kill">
|
||
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
||
|
</kill>
|
||
|
|
||
|
<action name="Step1">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step1.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step2"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step2">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step2.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step3"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step3">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step3.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step4"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step4">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step4.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step5"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step5">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step5.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step6"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step6">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step6.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step7"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step7">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step7.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step8"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step8">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step8.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step9"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step9">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step9.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step10"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step10">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step10.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
<param>external_stats_db_name=${external_stats_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step11"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step11">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step11.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
<param>external_stats_db_name=${external_stats_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step12"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step12">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step12.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step13"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step13">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step13.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step14"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step14">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step14.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step15"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step15">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step15.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step16"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step16">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step16.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step16_5"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step16_5">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step16_5.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step16_6"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step16_6">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step16_6.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>openaire_db_name=${openaire_db_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step17"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step17">
|
||
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
||
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
||
|
<script>scripts/step17.sql</script>
|
||
|
<param>stats_db_name=${stats_db_name}</param>
|
||
|
<param>stats_db_shadow_name=${stats_db_shadow_name}</param>
|
||
|
</hive2>
|
||
|
<ok to="Step18"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step18">
|
||
|
<shell xmlns="uri:oozie:shell-action:0.1">
|
||
|
<job-tracker>${jobTracker}</job-tracker>
|
||
|
<name-node>${nameNode}</name-node>
|
||
|
<exec>impala-shell.sh</exec>
|
||
|
<argument>${stats_db_name}</argument>
|
||
|
<argument>step18.sql</argument>
|
||
|
<argument>${wf:appPath()}/scripts/step18.sql</argument>
|
||
|
<file>impala-shell.sh</file>
|
||
|
</shell>
|
||
|
<ok to="Step19"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step19">
|
||
|
<shell xmlns="uri:oozie:shell-action:0.1">
|
||
|
<job-tracker>${jobTracker}</job-tracker>
|
||
|
<name-node>${nameNode}</name-node>
|
||
|
<exec>impala-shell.sh</exec>
|
||
|
<argument>${stats_db_shadow_name}</argument>
|
||
|
<argument>step19.sql</argument>
|
||
|
<argument>${wf:appPath()}/scripts/step19.sql</argument>
|
||
|
<file>impala-shell.sh</file>
|
||
|
</shell>
|
||
|
<ok to="Step20"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<action name="Step20">
|
||
|
<shell xmlns="uri:oozie:shell-action:0.1">
|
||
|
<job-tracker>${jobTracker}</job-tracker>
|
||
|
<name-node>${nameNode}</name-node>
|
||
|
<exec>updateCache.sh</exec>
|
||
|
<argument>${stats_tool_api_url}</argument>
|
||
|
<file>updateCache.sh</file>
|
||
|
</shell>
|
||
|
<ok to="End"/>
|
||
|
<error to="Kill"/>
|
||
|
</action>
|
||
|
|
||
|
<end name="End"/>
|
||
|
</workflow-app>
|