forked from D-Net/dnet-hadoop
87 lines
3.1 KiB
XML
87 lines
3.1 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_production_name</name>
|
|
<description>the name of the production schema</description>
|
|
</property>
|
|
<property>
|
|
<name>stats_tool_api_url</name>
|
|
<description>The url of the API of the stats tool. Is used to trigger the cache promote.</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="updateProductionViews"/>
|
|
|
|
<kill name="Kill">
|
|
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
|
</kill>
|
|
|
|
<action name="updateProductionViews">
|
|
<hive2 xmlns="uri:oozie:hive2-action:0.1">
|
|
<jdbc-url>${hive_jdbc_url}</jdbc-url>
|
|
<script>scripts/updateProductionViews.sql</script>
|
|
<param>stats_db_name=${stats_db_name}</param>
|
|
<param>stats_db_production_name=${stats_db_production_name}</param>
|
|
</hive2>
|
|
<ok to="computeProductionStats"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="computeProductionStats">
|
|
<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_production_name}</argument>
|
|
<argument>computeProductionStats.sql</argument>
|
|
<argument>${wf:appPath()}/scripts/computeProductionStats.sql</argument>
|
|
<file>impala-shell.sh</file>
|
|
</shell>
|
|
<ok to="promoteCache"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
|
|
<action name="promoteCache">
|
|
<shell xmlns="uri:oozie:shell-action:0.1">
|
|
<job-tracker>${jobTracker}</job-tracker>
|
|
<name-node>${nameNode}</name-node>
|
|
<exec>promoteCache.sh</exec>
|
|
<argument>${stats_tool_api_url}</argument>
|
|
<file>promoteCache.sh</file>
|
|
</shell>
|
|
<ok to="End"/>
|
|
<error to="Kill"/>
|
|
</action>
|
|
<end name="End"/>
|
|
</workflow-app> |