2020-12-02 14:41:56 +01:00
<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>
2020-12-04 12:07:18 +01:00
<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>
2020-12-02 14:41:56 +01:00
<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>
2020-12-02 14:57:17 +01:00
<start to= "updateProductionViews" />
2020-12-02 14:41:56 +01:00
<kill name= "Kill" >
<message > Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
2020-12-02 14:57:17 +01:00
<action name= "updateProductionViews" >
2020-12-02 14:41:56 +01:00
<hive2 xmlns= "uri:oozie:hive2-action:0.1" >
<jdbc-url > ${hive_jdbc_url}</jdbc-url>
2020-12-02 14:57:17 +01:00
<script > scripts/updateProductionViews.sql</script>
2020-12-02 14:41:56 +01:00
<param > stats_db_name=${stats_db_name}</param>
2020-12-02 14:57:17 +01:00
<param > stats_db_production_name=${stats_db_production_name}</param>
2020-12-02 14:41:56 +01:00
</hive2>
2020-12-02 14:57:17 +01:00
<ok to= "computeProductionStats" />
2020-12-02 14:41:56 +01:00
<error to= "Kill" />
</action>
2020-12-02 14:57:17 +01:00
<action name= "computeProductionStats" >
2020-12-02 14:41:56 +01:00
<shell xmlns= "uri:oozie:shell-action:0.1" >
<job-tracker > ${jobTracker}</job-tracker>
<name-node > ${nameNode}</name-node>
<exec > impala-shell.sh</exec>
2020-12-02 14:57:17 +01:00
<argument > ${stats_db_production_name}</argument>
<argument > computeProductionStats.sql</argument>
<argument > ${wf:appPath()}/scripts/computeProductionStats.sql</argument>
2020-12-02 14:41:56 +01:00
<file > impala-shell.sh</file>
</shell>
2020-12-02 14:57:17 +01:00
<ok to= "promoteCache" />
2020-12-02 14:41:56 +01:00
<error to= "Kill" />
</action>
2020-12-02 14:57:17 +01:00
<action name= "promoteCache" >
2020-12-02 14:41:56 +01:00
<shell xmlns= "uri:oozie:shell-action:0.1" >
<job-tracker > ${jobTracker}</job-tracker>
<name-node > ${nameNode}</name-node>
2020-12-02 14:57:17 +01:00
<exec > promoteCache.sh</exec>
2020-12-02 14:41:56 +01:00
<argument > ${stats_tool_api_url}</argument>
2020-12-02 14:57:17 +01:00
<file > promoteCache.sh</file>
2020-12-02 14:41:56 +01:00
</shell>
<ok to= "End" />
<error to= "Kill" />
</action>
<end name= "End" />
2020-12-02 14:57:17 +01:00
</workflow-app>