You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Attila Sasvari (JIRA)" <ji...@apache.org> on 2017/11/23 15:55:00 UTC
[jira] [Created] (OOZIE-3133) Coordinator SLA example in
documentation using old schema resulting in invalid XML
Attila Sasvari created OOZIE-3133:
-------------------------------------
Summary: Coordinator SLA example in documentation using old schema resulting in invalid XML
Key: OOZIE-3133
URL: https://issues.apache.org/jira/browse/OOZIE-3133
Project: Oozie
Issue Type: Bug
Components: docs
Reporter: Attila Sasvari
https://oozie.apache.org/docs/4.3.0/CoordinatorFunctionalSpec.html#Coordinator_SLA_Example gives a wrong example to use coordinator with SLA
{code}
<coordinator-app name="hello-coord" frequency="${coord:days(1)}"
start="2009-01-02T08:01Z" end="2010-01-01T08:01Z"
timezone="America/Los_Angeles"
xmlns="uri:oozie:coordinator:0.1"
xmlns:sla="uri:oozie:sla:0.1"> <datasets>
<dataset name="logs" frequency="${1 * HOURS}"
initial-instance="2009-01-01T09:00Z"
timezone="America/Los_Angeles">
<uri-template>
hdfs://bar:8020/app/logs/${YEAR}/${MONTH}/${DAY}/${HOUR}/data
</uri-template>
</dataset>
</datasets>
<input-events>
<data-in name="input" dataset="logs">
<start-instance>${coord:current( -(coord:hoursInDay(0) - 1) )}</start-instance>
<end-instance>${coord:current(0)}</end-instance>
</data-in>
</input-events>
<action>
<workflow>
<app-path>hdfs://bar:8020/usr/joe/hello-wf</app-path>
<configuration>
<property>
<name>input</name>
<value>${coord:dataIn('input')}</value>
</property>
</configuration>
</workflow>
<sla:info>
<sla:nominal-time>${coord:nominalTime()}</sla:nominal-time>
<sla:should-start>${5 * MINUTES}</sla:should-start>
<sla:should-end>${55 * MINUTES}</sla:should-end>
<sla:message>log processor run for: ${coord:nominalTime()}</sla:message>
<sla:alert-contact>joe@example.com</sla:alert-contact>
<sla:dev-contact>abc@example.com</sla:dev-contact>
<sla:qa-contact>abc@example.com</sla:qa-contact>
<sla:se-contact>abc@example.com</sla:se-contact>
<sla:upstream-apps>application-a,application-b</sla:upstream-apps>
<sla:alert-percentage>99</sla:alert-percentage>
<sla:alert-frequency>${24 * LAST_HOUR}</sla:alert-frequency>
</sla:info>
</action>
</coordinator-app>
{code}
"uri:oozie:sla:0.1" is used but the sla:info does not contain required elements (such as "app-name") and also contain invalid elements (such as "alert percentage").
It would be better to give an example for a "0.4" coordinator with sla "0.2".
{code}
<coordinator-app name="cron-coord" frequency="${coord:minutes(10)}" start="${start}" end="${end}" timezone="UTC"
xmlns:sla="uri:oozie:sla:0.2" xmlns="uri:oozie:coordinator:0.4">
<action>
<workflow>
...
</workflow>
<sla:info>
<sla:nominal-time>${coord:nominalTime()}</sla:nominal-time>
<sla:should-start>${5 * MINUTES}</sla:should-start>
<sla:should-end>${55 * MINUTES}</sla:should-end>
<sla:upstream-apps>application-a,application-b</sla:upstream-apps>
</sla:info>
</action>
</coordinator-app>
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)