Author: rohini
Date: Wed Jul 3 17:46:39 2013
New Revision: 1499497
URL: http://svn.apache.org/r1499497
Log:
OOZIE-1249 SLA Documentation (mona,virag,rohini via rohini)
Modified:
oozie/branches/branch-4.0/core/src/main/java/org/apache/oozie/sla/listener/SLAEmailEventListener.java
oozie/branches/branch-4.0/core/src/main/resources/oozie-default.xml
oozie/branches/branch-4.0/docs/src/site/twiki/AG_Install.twiki
oozie/branches/branch-4.0/docs/src/site/twiki/CoordinatorFunctionalSpec.twiki
oozie/branches/branch-4.0/docs/src/site/twiki/DG_CommandLineTool.twiki
oozie/branches/branch-4.0/docs/src/site/twiki/WebServicesAPI.twiki
oozie/branches/branch-4.0/docs/src/site/twiki/WorkflowFunctionalSpec.twiki
oozie/branches/branch-4.0/docs/src/site/twiki/index.twiki
oozie/branches/branch-4.0/release-log.txt
Modified:
oozie/branches/branch-4.0/core/src/main/java/org/apache/oozie/sla/listener/SLAEmailEventListener.java
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-4.0/core/src/main/java/org/apache/oozie/sla/listener/SLAEmailEventListener.java?rev=1499497&r1=1499496&r2=1499497&view=diff
==============================================================================
---
oozie/branches/branch-4.0/core/src/main/java/org/apache/oozie/sla/listener/SLAEmailEventListener.java
(original)
+++
oozie/branches/branch-4.0/core/src/main/java/org/apache/oozie/sla/listener/SLAEmailEventListener.java
Wed Jul 3 17:46:39 2013
@@ -82,8 +82,8 @@ public class SLAEmailEventListener exten
EVENT_STATUS("SLA Status"), APP_TYPE("App Type"), APP_NAME("App
Name"), USER("User"), JOBID("Job ID"), PARENT_JOBID(
"Parent Job ID"), JOB_URL("Job URL"), PARENT_JOB_URL("Parent
Job URL"), NOMINAL_TIME("Nominal Time"),
EXPECTED_START_TIME("Expected Start Time"),
ACTUAL_START_TIME("Actual Start Time"),
- EXPECTED_END_TIME("Expected End Time"),
ACTUAL_END_TIME("Actual End Time"), EXPECTED_DURATION("Expected Duration"),
- ACTUAL_DURATION("Actual Duration"),
NOTIFICATION_MESSAGE("Notification Message"), UPSTREAM_APPS("Upstream Apps"),
+ EXPECTED_END_TIME("Expected End Time"),
ACTUAL_END_TIME("Actual End Time"), EXPECTED_DURATION("Expected Duration (in
mins)"),
+ ACTUAL_DURATION("Actual Duration (in mins)"),
NOTIFICATION_MESSAGE("Notification Message"), UPSTREAM_APPS("Upstream Apps"),
JOB_STATUS("Job Status");
private String name;
@@ -286,30 +286,29 @@ public class SLAEmailEventListener exten
private void setMessageBody(Message msg, SLAEvent event) throws
MessagingException {
StringBuilder body = new StringBuilder();
printHeading(body, "Status");
- printField(body, EmailField.EVENT_STATUS.toString(),
event.getEventStatus(), false);
- printField(body, EmailField.JOB_STATUS.toString(),
event.getJobStatus(), false);
- printField(body, EmailField.NOTIFICATION_MESSAGE.toString(),
event.getNotificationMsg(), false);
+ printField(body, EmailField.EVENT_STATUS.toString(),
event.getEventStatus());
+ printField(body, EmailField.JOB_STATUS.toString(),
event.getJobStatus());
+ printField(body, EmailField.NOTIFICATION_MESSAGE.toString(),
event.getNotificationMsg());
printHeading(body, "Job Details");
- printField(body, EmailField.APP_NAME.toString(), event.getAppName(),
false);
- printField(body, EmailField.APP_TYPE.toString(), event.getAppType(),
false);
- printField(body, EmailField.USER.toString(), event.getUser(), false);
- printField(body, EmailField.JOBID.toString(), event.getId(), false);
- printField(body, EmailField.JOB_URL.toString(),
getJobLink(event.getId()), false);
- printField(body, EmailField.PARENT_JOBID.toString(),
event.getParentId() != null ? event.getParentId() : "N/A",
- false);
+ printField(body, EmailField.APP_NAME.toString(), event.getAppName());
+ printField(body, EmailField.APP_TYPE.toString(), event.getAppType());
+ printField(body, EmailField.USER.toString(), event.getUser());
+ printField(body, EmailField.JOBID.toString(), event.getId());
+ printField(body, EmailField.JOB_URL.toString(),
getJobLink(event.getId()));
+ printField(body, EmailField.PARENT_JOBID.toString(),
event.getParentId() != null ? event.getParentId() : "N/A");
printField(body, EmailField.PARENT_JOB_URL.toString(),
- event.getParentId() != null ? getJobLink(event.getParentId())
: "N/A", false);
- printField(body, EmailField.UPSTREAM_APPS.toString(),
event.getUpstreamApps(), false);
+ event.getParentId() != null ? getJobLink(event.getParentId())
: "N/A");
+ printField(body, EmailField.UPSTREAM_APPS.toString(),
event.getUpstreamApps());
printHeading(body, "SLA Details");
- printField(body, EmailField.NOMINAL_TIME.toString(),
event.getNominalTime(), false);
- printField(body, EmailField.EXPECTED_START_TIME.toString(),
event.getExpectedStart(), false);
- printField(body, EmailField.ACTUAL_START_TIME.toString(),
event.getActualStart(), false);
- printField(body, EmailField.EXPECTED_END_TIME.toString(),
event.getExpectedEnd(), false);
- printField(body, EmailField.ACTUAL_END_TIME.toString(),
event.getActualEnd(), false);
- printField(body, EmailField.EXPECTED_DURATION.toString(),
event.getExpectedDuration(), false);
- printField(body, EmailField.ACTUAL_DURATION.toString(),
event.getActualDuration(), false);
+ printField(body, EmailField.NOMINAL_TIME.toString(),
event.getNominalTime());
+ printField(body, EmailField.EXPECTED_START_TIME.toString(),
event.getExpectedStart());
+ printField(body, EmailField.ACTUAL_START_TIME.toString(),
event.getActualStart());
+ printField(body, EmailField.EXPECTED_END_TIME.toString(),
event.getExpectedEnd());
+ printField(body, EmailField.ACTUAL_END_TIME.toString(),
event.getActualEnd());
+ printField(body, EmailField.EXPECTED_DURATION.toString(),
event.getExpectedDuration());
+ printField(body, EmailField.ACTUAL_DURATION.toString(),
event.getActualDuration());
try {
msg.setText(body.toString());
@@ -329,15 +328,14 @@ public class SLAEmailEventListener exten
return url.toString();
}
- private void printField(StringBuilder st, String name, Object value,
boolean last) {
+ private void printField(StringBuilder st, String name, Object value) {
String lineFeed = "\n";
if (value != null) {
st.append(EMAIL_BODY_FIELD_INDENT);
st.append(name);
st.append(EMAIL_BODY_FIELD_SEPARATER);
st.append(value);
- if (!last)
- st.append(lineFeed);
+ st.append(lineFeed);
}
}
Modified: oozie/branches/branch-4.0/core/src/main/resources/oozie-default.xml
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-4.0/core/src/main/resources/oozie-default.xml?rev=1499497&r1=1499496&r2=1499497&view=diff
==============================================================================
--- oozie/branches/branch-4.0/core/src/main/resources/oozie-default.xml
(original)
+++ oozie/branches/branch-4.0/core/src/main/resources/oozie-default.xml Wed Jul
3 17:46:39 2013
@@ -167,16 +167,16 @@
default=${username}
</value>
<description>
- Other topic options are ${jobid} or a fixed string.
- A fixed string can also be specified as topic for a particular job
type.
+ Topic options are ${username} or ${jobId} or a fixed string which can
be specified as default or for a
+ particular job type.
For e.g To have a fixed string topic for workflows, coordinators and
bundles,
specify in the following comma-separated format:
{jobtype1}={some_string1}, {jobtype2}={some_string2}
- where job type can be WORKFLOW, COORDINATOR or BUNDLE
- E.g Following defines topic for workflow job, workflow action,
coordinator job, coordinator action,
+ where job type can be WORKFLOW, COORDINATOR or BUNDLE.
+ e.g. Following defines topic for workflow job, workflow action,
coordinator job, coordinator action,
bundle job and bundle action
WORKFLOW=workflow,
COORDINATOR=coordinator,
- BUNDLE=${jobId}
+ BUNDLE=bundle
For jobs with no defined topic, default topic will be ${username}
</description>
</property>
Modified: oozie/branches/branch-4.0/docs/src/site/twiki/AG_Install.twiki
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-4.0/docs/src/site/twiki/AG_Install.twiki?rev=1499497&r1=1499496&r2=1499497&view=diff
==============================================================================
--- oozie/branches/branch-4.0/docs/src/site/twiki/AG_Install.twiki (original)
+++ oozie/branches/branch-4.0/docs/src/site/twiki/AG_Install.twiki Wed Jul 3
17:46:39 2013
@@ -514,6 +514,99 @@ in =oozie.service.coord.push.check.reque
The defaults for =oozie.service.coord.input.check.requeue.interval= and
=oozie.service.coord.push.check.requeue.interval=
are 1 minute and 10 minutes respectively.
+---+++ Notifications Configuration
+
+Oozie supports publishing notifications to a JMS Provider for job status
changes and SLA met and miss events. For
+more information on the feature, refer [[DG_JMSNotifications][JMS
Notifications]] documentation. Oozie can also send email
+notifications on SLA misses.
+
+ * *Message Broker Installation*: <br/>
+For Oozie to send/receive messages, a JMS-compliant broker should be
installed. Apache ActiveMQ is a popular JMS-compliant
+broker usable for this purpose. See
[[http://activemq.apache.org/getting-started.html][here]] for instructions on
+installing and running ActiveMQ.
+
+ * *Services*: <br/>
+Add/modify =oozie.services.ext= property in =oozie-site.xml= to include the
following services.
+ <verbatim>
+ <property>
+ <name>oozie.services.ext</name>
+ <value>
+ org.apache.oozie.service.JMSAccessorService,
+ org.apache.oozie.service.JMSTopicService,
+ org.apache.oozie.service.EventHandlerService,
+ org.apache.oozie.sla.service.SLAService
+ </value>
+ </property>
+ </verbatim>
+
+ * *Event Handlers*: <br/>
+ <verbatim>
+ <property>
+ <name>oozie.service.EventHandlerService.event.listeners</name>
+ <value>
+ org.apache.oozie.jms.JMSJobEventListener,
+ org.apache.oozie.sla.listener.SLAJobEventListener,
+ org.apache.oozie.jms.JMSSLAEventListener,
+ org.apache.oozie.sla.listener.SLAEmailEventListener
+ </value>
+ </property>
+ </verbatim>
+ It is also recommended to increase
=oozie.service.SchedulerService.threads= to 15 for faster event processing and
sending notifications. The services and their functions are as follows: <br/>
+ JMSJobEventListener - Sends JMS job notifications <br/>
+ JMSSLAEventListener - Sends JMS SLA notifications <br/>
+ SLAEmailEventListener - Sends Email SLA notifications <br/>
+ SLAJobEventListener - Processes job events and calculates SLA. Does not
send any notifications
+ * *JMS properties*: <br/>
+Add =oozie.jms.producer.connection.properties= property in =oozie-site.xml=.
Its value corresponds to an
+identifier (e.g. default) assigned to a semi-colon separated key#value list of
properties from your JMS broker's
+=jndi.properties= file. The important properties are
=java.naming.factory.initial= and =java.naming.provider.url=.
+
+ As an example, if using ActiveMQ in local env, the property can be set to
+ <verbatim>
+ <property>
+ <name>oozie.jms.producer.connection.properties</name>
+ <value>
+
default=java.naming.factory.initial#org.apache.activemq.jndi.ActiveMQInitialContextFactory;java.naming.provider.url#tcp://localhost:61616
+ </value>
+ </property>
+ </verbatim>
+ * *JMS Topic name*: <br/>
+JMS consumers listen on a particular "topic". Hence Oozie needs to define a
topic variable with which to publish messages
+about the various jobs.
+ <verbatim>
+ <property>
+ <name>oozie.service.JMSTopicService.topic.name</name>
+ <value>
+ default=${username}
+ </value>
+ <description>
+ Topic options are ${username} or a fixed string which can be
specified as default or for a
+ particular job type.
+ For e.g To have a fixed string topic for workflows, coordinators
and bundles,
+ specify in the following comma-separated format:
{jobtype1}={some_string1}, {jobtype2}={some_string2}
+ where job type can be WORKFLOW, COORDINATOR or BUNDLE.
+ Following example defines topic for workflow job, workflow action,
coordinator job, coordinator action,
+ bundle job and bundle action
+ WORKFLOW=workflow,
+ COORDINATOR=coordinator,
+ BUNDLE=bundle
+ For jobs with no defined topic, default topic will be ${username}
+ </description>
+ </property>
+ </verbatim>
+
+ Another related property is the topic prefix.
+ <verbatim>
+ <property>
+ <name>oozie.service.JMSTopicService.topic.prefix</name>
+ <value></value>
+ <description>
+ This can be used to append a prefix to the topic in
oozie.service.JMSTopicService.topic.name. For eg: oozie.
+ </description>
+ </property>
+ </verbatim>
+
+
---+++ Setting Up Oozie with HTTPS (SSL)
*IMPORTANT*:
@@ -676,7 +769,6 @@ the =oozie.action.mapreduce.uber.jar.ena
</configuration>
</verbatim>
-
---++ Advanced/Custom Environment Settings
Oozie can be configured to use Unix standard filesystem hierarchy for its
different files
Modified:
oozie/branches/branch-4.0/docs/src/site/twiki/CoordinatorFunctionalSpec.twiki
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-4.0/docs/src/site/twiki/CoordinatorFunctionalSpec.twiki?rev=1499497&r1=1499496&r2=1499497&view=diff
==============================================================================
---
oozie/branches/branch-4.0/docs/src/site/twiki/CoordinatorFunctionalSpec.twiki
(original)
+++
oozie/branches/branch-4.0/docs/src/site/twiki/CoordinatorFunctionalSpec.twiki
Wed Jul 3 17:46:39 2013
@@ -3094,11 +3094,13 @@ the notification:
---++ Appendixes
---+++ Appendix A, Oozie Coordinator XML-Schema
----++++ Oozie Coordinator Schema 0.1
+
+---++++ Oozie Coordinator Schema 0.4
+
<verbatim>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:coordinator="uri:oozie:coordinator:0.1"
- elementFormDefault="qualified" targetNamespace="uri:oozie:coordinator:0.1">
-
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:coordinator="uri:oozie:coordinator:0.2"
+ elementFormDefault="qualified"
targetNamespace="uri:oozie:coordinator:0.2">
+
<xs:element name="coordinator-app" type="coordinator:COORDINATOR-APP"/>
<xs:element name="datasets" type="coordinator:DATASETS"/>
<xs:simpleType name="IDENTIFIER">
@@ -3108,6 +3110,7 @@ the notification:
</xs:simpleType>
<xs:complexType name="COORDINATOR-APP">
<xs:sequence>
+ <xs:element name="parameters" type="coordinator:PARAMETERS"
minOccurs="0" maxOccurs="1"/>
<xs:element name="controls" type="coordinator:CONTROLS"
minOccurs="0" maxOccurs="1"/>
<xs:element name="datasets" type="coordinator:DATASETS"
minOccurs="0" maxOccurs="1"/>
<xs:element name="input-events" type="coordinator:INPUTEVENTS"
minOccurs="0" maxOccurs="1"/>
@@ -3120,11 +3123,25 @@ the notification:
<xs:attribute name="end" type="xs:string" use="required"/>
<xs:attribute name="timezone" type="xs:string" use="required"/>
</xs:complexType>
+ <xs:complexType name="PARAMETERS">
+ <xs:sequence>
+ <xs:element name="property" minOccurs="1" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="name" minOccurs="1" maxOccurs="1"
type="xs:string"/>
+ <xs:element name="value" minOccurs="0" maxOccurs="1"
type="xs:string"/>
+ <xs:element name="description" minOccurs="0"
maxOccurs="1" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
<xs:complexType name="CONTROLS">
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:element name="timeout" type="xs:string" minOccurs="0"
maxOccurs="1"/>
<xs:element name="concurrency" type="xs:string" minOccurs="0"
maxOccurs="1"/>
<xs:element name="execution" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="throttle" type="xs:string" minOccurs="0"
maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DATASETS">
@@ -3314,11 +3331,10 @@ the notification:
</xs:schema>
</verbatim>
----++++ Oozie Coordinator Schema 0.4
-
+---++++ Oozie Coordinator Schema 0.1
<verbatim>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:coordinator="uri:oozie:coordinator:0.2"
- elementFormDefault="qualified"
targetNamespace="uri:oozie:coordinator:0.2">
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:coordinator="uri:oozie:coordinator:0.1"
+ elementFormDefault="qualified" targetNamespace="uri:oozie:coordinator:0.1">
<xs:element name="coordinator-app" type="coordinator:COORDINATOR-APP"/>
<xs:element name="datasets" type="coordinator:DATASETS"/>
@@ -3329,7 +3345,6 @@ the notification:
</xs:simpleType>
<xs:complexType name="COORDINATOR-APP">
<xs:sequence>
- <xs:element name="parameters" type="coordinator:PARAMETERS"
minOccurs="0" maxOccurs="1"/>
<xs:element name="controls" type="coordinator:CONTROLS"
minOccurs="0" maxOccurs="1"/>
<xs:element name="datasets" type="coordinator:DATASETS"
minOccurs="0" maxOccurs="1"/>
<xs:element name="input-events" type="coordinator:INPUTEVENTS"
minOccurs="0" maxOccurs="1"/>
@@ -3342,25 +3357,11 @@ the notification:
<xs:attribute name="end" type="xs:string" use="required"/>
<xs:attribute name="timezone" type="xs:string" use="required"/>
</xs:complexType>
- <xs:complexType name="PARAMETERS">
- <xs:sequence>
- <xs:element name="property" minOccurs="1" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="name" minOccurs="1" maxOccurs="1"
type="xs:string"/>
- <xs:element name="value" minOccurs="0" maxOccurs="1"
type="xs:string"/>
- <xs:element name="description" minOccurs="0"
maxOccurs="1" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
<xs:complexType name="CONTROLS">
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:element name="timeout" type="xs:string" minOccurs="0"
maxOccurs="1"/>
<xs:element name="concurrency" type="xs:string" minOccurs="0"
maxOccurs="1"/>
<xs:element name="execution" type="xs:string" minOccurs="0"
maxOccurs="1"/>
- <xs:element name="throttle" type="xs:string" minOccurs="0"
maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DATASETS">
@@ -3439,7 +3440,46 @@ the notification:
</xs:schema>
</verbatim>
----++++ Oozie SLA Schema
+
+---++++ Oozie SLA Schemas
+
+---+++++ Oozie SLA Version 0.2
+ * Supported in Oozie coordinator schema version 0.4
+
+<verbatim>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:sla="uri:oozie:sla:0.2" elementFormDefault="qualified"
+ targetNamespace="uri:oozie:sla:0.2">
+
+ <xs:element name="info" type="sla:SLA-INFO"/>
+
+ <xs:complexType name="SLA-INFO">
+ <xs:sequence>
+ <xs:element name="nominal-time" type="xs:string" minOccurs="1"
+ maxOccurs="1"/>
+ <xs:element name="should-start" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+ <xs:element name="should-end" type="xs:string" minOccurs="1"
+ maxOccurs="1"/>
+ <xs:element name="max-duration" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+
+ <xs:element name="alert-events" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+ <xs:element name="alert-contact" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+ <xs:element name="notification-msg" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+ <xs:element name="upstream-apps" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+</xs:schema>
+</verbatim>
+
+---+++++ Oozie SLA Version 0.1
+
<verbatim>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
Modified: oozie/branches/branch-4.0/docs/src/site/twiki/DG_CommandLineTool.twiki
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-4.0/docs/src/site/twiki/DG_CommandLineTool.twiki?rev=1499497&r1=1499496&r2=1499497&view=diff
==============================================================================
--- oozie/branches/branch-4.0/docs/src/site/twiki/DG_CommandLineTool.twiki
(original)
+++ oozie/branches/branch-4.0/docs/src/site/twiki/DG_CommandLineTool.twiki Wed
Jul 3 17:46:39 2013
@@ -82,7 +82,7 @@ usage:
.
oozie validate <ARGS> : validate a workflow XML file
.
- oozie sla <OPTIONS> : sla operations (Supported in Oozie-2.0 or later)
+ oozie sla <OPTIONS> : sla operations (Deprecated as of Oozie 4.0)
-auth <arg> select authentication type
[SIMPLE|KERBEROS]
-len <arg> number of results (default '100', max
limited by oozie server setting which defaults to '1000')
-offset <arg> start offset (default '0')
@@ -782,11 +782,12 @@ Error: Invalid workflow-app, org.xml.sax
It performs an XML Schema validation on the specified workflow XML file.
+#SLAOperations
---++ SLA Operations
---+++ Getting a list of SLA events
-* This feature is only supported in Oozie 2.0 or later.
+ This set of sla commands are deprecated as of Oozie 4.0 with a newer SLA
monitoring system.
Example:
Modified: oozie/branches/branch-4.0/docs/src/site/twiki/WebServicesAPI.twiki
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-4.0/docs/src/site/twiki/WebServicesAPI.twiki?rev=1499497&r1=1499496&r2=1499497&view=diff
==============================================================================
--- oozie/branches/branch-4.0/docs/src/site/twiki/WebServicesAPI.twiki
(original)
+++ oozie/branches/branch-4.0/docs/src/site/twiki/WebServicesAPI.twiki Wed Jul
3 17:46:39 2013
@@ -18,6 +18,10 @@ Assuming Oozie is runing at =OOZIE_URL=,
* <OOZIE_URL>/v1/admin
* <OOZIE_URL>/v1/job
* <OOZIE_URL>/v1/jobs
+ * <OOZIE_URL>/v2/job
+ * <OOZIE_URL>/v2/jobs
+ * <OOZIE_URL>/v2/admin
+ * <OOZIE_URL>/v2/sla
Documentation on the API is below; in some cases, looking at the corresponding
command in the
[[DG_CommandLineTool][Command Line Documentation]] page will provide
additional details and examples. Most of the functionality
@@ -34,7 +38,7 @@ It support only HTTP GET request and not
It returns the supported Oozie protocol versions by the server.
-Current returned values are =0, 1=.
+Current returned values are =0, 1, 2=.
*Request:*
Modified:
oozie/branches/branch-4.0/docs/src/site/twiki/WorkflowFunctionalSpec.twiki
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-4.0/docs/src/site/twiki/WorkflowFunctionalSpec.twiki?rev=1499497&r1=1499496&r2=1499497&view=diff
==============================================================================
--- oozie/branches/branch-4.0/docs/src/site/twiki/WorkflowFunctionalSpec.twiki
(original)
+++ oozie/branches/branch-4.0/docs/src/site/twiki/WorkflowFunctionalSpec.twiki
Wed Jul 3 17:46:39 2013
@@ -2417,6 +2417,331 @@ to be executed.
#OozieWFSchema
---+++ Appendix A, Oozie XML-Schema
+---++++ Oozie Schema Version 0.5
+<verbatim>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:workflow="uri:oozie:workflow:0.5"
+ elementFormDefault="qualified"
targetNamespace="uri:oozie:workflow:0.5">
+
+ <xs:element name="workflow-app" type="workflow:WORKFLOW-APP"/>
+
+ <xs:simpleType name="IDENTIFIER">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="([a-zA-Z_]([\-_a-zA-Z0-9])*){1,39}"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="WORKFLOW-APP">
+ <xs:sequence>
+ <xs:element name="parameters" type="workflow:PARAMETERS"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="global" type="workflow:GLOBAL" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="credentials" type="workflow:CREDENTIALS"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="start" type="workflow:START" minOccurs="1"
maxOccurs="1"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="decision" type="workflow:DECISION"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="fork" type="workflow:FORK" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="join" type="workflow:JOIN" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="kill" type="workflow:KILL" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="action" type="workflow:ACTION" minOccurs="1"
maxOccurs="1"/>
+ </xs:choice>
+ <xs:element name="end" type="workflow:END" minOccurs="1"
maxOccurs="1"/>
+ <xs:any namespace="uri:oozie:sla:0.1 uri:oozie:sla:0.2"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="PARAMETERS">
+ <xs:sequence>
+ <xs:element name="property" minOccurs="1" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="name" minOccurs="1" maxOccurs="1"
type="xs:string"/>
+ <xs:element name="value" minOccurs="0" maxOccurs="1"
type="xs:string"/>
+ <xs:element name="description" minOccurs="0"
maxOccurs="1" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="GLOBAL">
+ <xs:sequence>
+ <xs:element name="job-tracker" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="name-node" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="job-xml" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="configuration" type="workflow:CONFIGURATION"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="START">
+ <xs:attribute name="to" type="workflow:IDENTIFIER" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="END">
+ <xs:attribute name="name" type="workflow:IDENTIFIER" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="DECISION">
+ <xs:sequence>
+ <xs:element name="switch" type="workflow:SWITCH" minOccurs="1"
maxOccurs="1"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="workflow:IDENTIFIER" use="required"/>
+ </xs:complexType>
+
+ <xs:element name="switch" type="workflow:SWITCH"/>
+
+ <xs:complexType name="SWITCH">
+ <xs:sequence>
+ <xs:sequence>
+ <xs:element name="case" type="workflow:CASE" minOccurs="1"
maxOccurs="unbounded"/>
+ <xs:element name="default" type="workflow:DEFAULT"
minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="CASE">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="to" type="workflow:IDENTIFIER"
use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:complexType name="DEFAULT">
+ <xs:attribute name="to" type="workflow:IDENTIFIER" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="FORK_TRANSITION">
+ <xs:attribute name="start" type="workflow:IDENTIFIER" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="FORK">
+ <xs:sequence>
+ <xs:element name="path" type="workflow:FORK_TRANSITION"
minOccurs="2" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="workflow:IDENTIFIER" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="JOIN">
+ <xs:attribute name="name" type="workflow:IDENTIFIER" use="required"/>
+ <xs:attribute name="to" type="workflow:IDENTIFIER" use="required"/>
+ </xs:complexType>
+
+ <xs:element name="kill" type="workflow:KILL"/>
+
+ <xs:complexType name="KILL">
+ <xs:sequence>
+ <xs:element name="message" type="xs:string" minOccurs="1"
maxOccurs="1"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="workflow:IDENTIFIER" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="ACTION_TRANSITION">
+ <xs:attribute name="to" type="workflow:IDENTIFIER" use="required"/>
+ </xs:complexType>
+
+ <xs:element name="map-reduce" type="workflow:MAP-REDUCE"/>
+ <xs:element name="pig" type="workflow:PIG"/>
+ <xs:element name="sub-workflow" type="workflow:SUB-WORKFLOW"/>
+ <xs:element name="fs" type="workflow:FS"/>
+ <xs:element name="java" type="workflow:JAVA"/>
+
+ <xs:complexType name="ACTION">
+ <xs:sequence>
+ <xs:choice minOccurs="1" maxOccurs="1">
+ <xs:element name="map-reduce" type="workflow:MAP-REDUCE"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="pig" type="workflow:PIG" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="sub-workflow" type="workflow:SUB-WORKFLOW"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="fs" type="workflow:FS" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="java" type="workflow:JAVA" minOccurs="1"
maxOccurs="1"/>
+ <xs:any namespace="##other" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ <xs:element name="ok" type="workflow:ACTION_TRANSITION"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="error" type="workflow:ACTION_TRANSITION"
minOccurs="1" maxOccurs="1"/>
+ <xs:any namespace="uri:oozie:sla:0.1 uri:oozie:sla:0.2"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="workflow:IDENTIFIER" use="required"/>
+ <xs:attribute name="cred" type="xs:string"/>
+ <xs:attribute name="retry-max" type="xs:string"/>
+ <xs:attribute name="retry-interval" type="xs:string"/>
+ </xs:complexType>
+
+ <xs:complexType name="MAP-REDUCE">
+ <xs:sequence>
+ <xs:element name="job-tracker" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="name-node" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="prepare" type="workflow:PREPARE" minOccurs="0"
maxOccurs="1"/>
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element name="streaming" type="workflow:STREAMING"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="pipes" type="workflow:PIPES" minOccurs="0"
maxOccurs="1"/>
+ </xs:choice>
+ <xs:element name="job-xml" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="configuration" type="workflow:CONFIGURATION"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="file" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="archive" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="PIG">
+ <xs:sequence>
+ <xs:element name="job-tracker" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="name-node" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="prepare" type="workflow:PREPARE" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="job-xml" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="configuration" type="workflow:CONFIGURATION"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="script" type="xs:string" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="param" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="argument" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="file" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="archive" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="SUB-WORKFLOW">
+ <xs:sequence>
+ <xs:element name="app-path" type="xs:string" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="propagate-configuration" type="workflow:FLAG"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="configuration" type="workflow:CONFIGURATION"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="FS">
+ <xs:sequence>
+ <xs:element name="name-node" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="job-xml" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="configuration" type="workflow:CONFIGURATION"
minOccurs="0" maxOccurs="1"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="delete" type="workflow:DELETE"/>
+ <xs:element name="mkdir" type="workflow:MKDIR"/>
+ <xs:element name="move" type="workflow:MOVE"/>
+ <xs:element name="chmod" type="workflow:CHMOD"/>
+ <xs:element name="touchz" type="workflow:TOUCHZ"/>
+ <xs:element name="chgrp" type="workflow:CHGRP"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="JAVA">
+ <xs:sequence>
+ <xs:element name="job-tracker" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="name-node" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="prepare" type="workflow:PREPARE" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="job-xml" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="configuration" type="workflow:CONFIGURATION"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="main-class" type="xs:string" minOccurs="1"
maxOccurs="1"/>
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element name="java-opts" type="xs:string" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="java-opt" type="xs:string" minOccurs="1"
maxOccurs="unbounded"/>
+ </xs:choice>
+ <xs:element name="arg" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="file" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="archive" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="capture-output" type="workflow:FLAG"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="FLAG"/>
+
+ <xs:complexType name="CONFIGURATION">
+ <xs:sequence>
+ <xs:element name="property" minOccurs="1" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="name" minOccurs="1" maxOccurs="1"
type="xs:string"/>
+ <xs:element name="value" minOccurs="1" maxOccurs="1"
type="xs:string"/>
+ <xs:element name="description" minOccurs="0"
maxOccurs="1" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="STREAMING">
+ <xs:sequence>
+ <xs:element name="mapper" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="reducer" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="record-reader" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="record-reader-mapping" type="xs:string"
minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="env" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="PIPES">
+ <xs:sequence>
+ <xs:element name="map" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="reduce" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="inputformat" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="partitioner" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="writer" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ <xs:element name="program" type="xs:string" minOccurs="0"
maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="PREPARE">
+ <xs:sequence>
+ <xs:element name="delete" type="workflow:DELETE" minOccurs="0"
maxOccurs="unbounded"/>
+ <xs:element name="mkdir" type="workflow:MKDIR" minOccurs="0"
maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="DELETE">
+ <xs:attribute name="path" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="MKDIR">
+ <xs:attribute name="path" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="MOVE">
+ <xs:attribute name="source" type="xs:string" use="required"/>
+ <xs:attribute name="target" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="CHMOD">
+ <xs:sequence>
+ <xs:element name="recursive" type="workflow:FLAG" minOccurs="0"
maxOccurs="1"></xs:element>
+ </xs:sequence>
+ <xs:attribute name="path" type="xs:string" use="required"/>
+ <xs:attribute name="permissions" type="xs:string" use="required"/>
+ <xs:attribute name="dir-files" type="xs:string"/>
+ </xs:complexType>
+
+ <xs:complexType name="TOUCHZ">
+ <xs:attribute name="path" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="CHGRP">
+ <xs:sequence>
+ <xs:element name="recursive" type="workflow:FLAG" minOccurs="0"
maxOccurs="1"></xs:element>
+ </xs:sequence>
+ <xs:attribute name="path" type="xs:string" use="required"/>
+ <xs:attribute name="group" type="xs:string" use="required"/>
+ <xs:attribute name="dir-files" type="xs:string"/>
+ </xs:complexType>
+
+ <xs:complexType name="CREDENTIALS">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="credential" type="workflow:CREDENTIAL"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="CREDENTIAL">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded" >
+ <xs:element name="property" minOccurs="1"
maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="name" minOccurs="1"
maxOccurs="1" type="xs:string"/>
+ <xs:element name="value" minOccurs="1"
maxOccurs="1" type="xs:string"/>
+ <xs:element name="description" minOccurs="0"
maxOccurs="1" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="type" type="xs:string" use="required"/>
+ </xs:complexType>
+</xs:schema>
+</verbatim>
+
---++++ Oozie Schema Version 0.4
<verbatim>
@@ -2725,6 +3050,7 @@ to be executed.
</xs:complexType>
</xs:schema>
</verbatim>
+
---++++ Oozie Schema Version 0.3
<verbatim>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:workflow="uri:oozie:workflow:0.3"
@@ -2996,10 +3322,11 @@ to be executed.
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="type" type="xs:string" use="required"/>
</xs:complexType>
-
+
</xs:schema>
</verbatim>
+
---++++ Oozie Schema Version 0.2.5
<verbatim>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:workflow="uri:oozie:workflow:0.2.5"
@@ -3271,6 +3598,7 @@ to be executed.
</xs:complexType>
</xs:schema>
</verbatim>
+
---++++ Oozie Schema Version 0.2
<verbatim>
<?xml version="1.0" encoding="UTF-8"?>
@@ -3521,9 +3849,45 @@ to be executed.
</xs:schema>
</verbatim>
+#SLASchema
+---++++ Oozie SLA Version 0.2
+ * Supported in Oozie workflow schema version 0.5
+
+<verbatim>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:sla="uri:oozie:sla:0.2" elementFormDefault="qualified"
+ targetNamespace="uri:oozie:sla:0.2">
+
+ <xs:element name="info" type="sla:SLA-INFO"/>
+
+ <xs:complexType name="SLA-INFO">
+ <xs:sequence>
+ <xs:element name="nominal-time" type="xs:string" minOccurs="1"
+ maxOccurs="1"/>
+ <xs:element name="should-start" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+ <xs:element name="should-end" type="xs:string" minOccurs="1"
+ maxOccurs="1"/>
+ <xs:element name="max-duration" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+
+ <xs:element name="alert-events" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+ <xs:element name="alert-contact" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+ <xs:element name="notification-msg" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+ <xs:element name="upstream-apps" type="xs:string" minOccurs="0"
+ maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+</xs:schema>
+</verbatim>
+
---++++ Oozie SLA Version 0.1
- * *Oozie SLA schema is supported in Oozie schema version 0.2*
+ * Oozie SLA schema is supported in Oozie workflow schema version 0.2 onwards
<verbatim>
<?xml version="1.0" encoding="UTF-8"?>
Modified: oozie/branches/branch-4.0/docs/src/site/twiki/index.twiki
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-4.0/docs/src/site/twiki/index.twiki?rev=1499497&r1=1499496&r2=1499497&view=diff
==============================================================================
--- oozie/branches/branch-4.0/docs/src/site/twiki/index.twiki (original)
+++ oozie/branches/branch-4.0/docs/src/site/twiki/index.twiki Wed Jul 3
17:46:39 2013
@@ -61,6 +61,11 @@ Enough reading already? Follow the steps
* [[DG_DistCpActionExtension][DistCp Action]]
* [[DG_CustomActionExecutor][Writing a Custom Action Executor]]
+---+++ Job Status and SLA Monitoring
+
+ * [[DG_JMSNotifications][JMS Notifications for Job and SLA]]
+ * [[DG_SLAMonitoring][Configuring and Monitoring SLA]]
+
---++ Administrator Documentation
* [[AG_Install][Oozie Install]]
Modified: oozie/branches/branch-4.0/release-log.txt
URL:
http://svn.apache.org/viewvc/oozie/branches/branch-4.0/release-log.txt?rev=1499497&r1=1499496&r2=1499497&view=diff
==============================================================================
--- oozie/branches/branch-4.0/release-log.txt (original)
+++ oozie/branches/branch-4.0/release-log.txt Wed Jul 3 17:46:39 2013
@@ -1,5 +1,6 @@
-- Oozie 4.0.0 release
+OOZIE-1249 SLA Documentation (mona,virag,rohini via rohini)
OOZIE-1441 Fix bugs related to coordchange and parentId in events (mona,virag
via virag)
OOZIE-1444 Job DAG causes OOM. Remove refresh option (rohini)
OOZIE-1379 Generate SLA end_miss event only after confirming against
persistent store (mona)