You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by mo...@apache.org on 2013/03/07 21:18:50 UTC

svn commit: r1454079 - in /oozie/trunk: examples/src/main/apps/sla/ examples/src/main/apps/sla/coordinator.xml examples/src/main/apps/sla/job.properties examples/src/main/apps/sla/workflow.xml release-log.txt

Author: mona
Date: Thu Mar  7 20:18:50 2013
New Revision: 1454079

URL: http://svn.apache.org/r1454079
Log:
OOZIE-1191 add examples of coordinator with SLA tag inserted (ryota via mona)

Added:
    oozie/trunk/examples/src/main/apps/sla/
    oozie/trunk/examples/src/main/apps/sla/coordinator.xml
    oozie/trunk/examples/src/main/apps/sla/job.properties
    oozie/trunk/examples/src/main/apps/sla/workflow.xml
Modified:
    oozie/trunk/release-log.txt

Added: oozie/trunk/examples/src/main/apps/sla/coordinator.xml
URL: http://svn.apache.org/viewvc/oozie/trunk/examples/src/main/apps/sla/coordinator.xml?rev=1454079&view=auto
==============================================================================
--- oozie/trunk/examples/src/main/apps/sla/coordinator.xml (added)
+++ oozie/trunk/examples/src/main/apps/sla/coordinator.xml Thu Mar  7 20:18:50 2013
@@ -0,0 +1,89 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<coordinator-app name="aggregator-coord" frequency="${coord:hours(1)}" start="${start}" end="${end}" timezone="UTC"
+                 xmlns="uri:oozie:coordinator:0.2" xmlns:sla="uri:oozie:sla:0.1">
+    <controls>
+        <concurrency>1</concurrency>
+    </controls>
+
+    <datasets>
+        <dataset name="raw-logs" frequency="${coord:minutes(20)}" initial-instance="2010-01-01T00:00Z" timezone="UTC">
+            <uri-template>${nameNode}/user/${coord:user()}/${examplesRoot}/input-data/rawLogs/${YEAR}/${MONTH}/${DAY}/${HOUR}/${MINUTE}</uri-template>
+        </dataset>
+        <dataset name="aggregated-logs" frequency="${coord:hours(1)}" initial-instance="2010-01-01T01:00Z" timezone="UTC">
+            <uri-template>${nameNode}/user/${coord:user()}/${examplesRoot}/output-data/aggregator/aggregatedLogs/${YEAR}/${MONTH}/${DAY}/${HOUR}</uri-template>
+        </dataset>
+    </datasets>
+
+    <input-events>
+        <data-in name="input" dataset="raw-logs">
+            <start-instance>${coord:current(-2)}</start-instance>
+            <end-instance>${coord:current(0)}</end-instance>
+        </data-in>
+    </input-events>
+
+    <output-events>
+        <data-out name="output" dataset="aggregated-logs">
+            <instance>${coord:current(0)}</instance>
+        </data-out>
+    </output-events>
+
+    <action>
+        <workflow>
+            <app-path>${nameNode}/user/${coord:user()}/${examplesRoot}/apps/sla/workflow.xml</app-path>
+            <configuration>
+                <property>
+                    <name>jobTracker</name>
+                    <value>${jobTracker}</value>
+                </property>
+                <property>
+                    <name>nameNode</name>
+                    <value>${nameNode}</value>
+                </property>
+                <property>
+                    <name>queueName</name>
+                    <value>${queueName}</value>
+                </property>
+                <property>
+                    <name>inputData</name>
+                    <value>${coord:dataIn('input')}</value>
+                </property>
+                <property>
+                    <name>outputData</name>
+                    <value>${coord:dataOut('output')}</value>
+                </property>
+            </configuration>
+        </workflow>
+
+      <sla:info>
+              <sla:app-name>${appName}</sla:app-name>
+              <sla:nominal-time>${coord:nominalTime()}</sla:nominal-time>
+              <sla:should-start>${shouldStart}</sla:should-start>
+              <sla:should-end>${shouldEnd}</sla:should-end>
+              <sla:notification-msg>${notificationMsg}</sla:notification-msg>
+              <sla:alert-contact>${alertContact}</sla:alert-contact>
+              <sla:dev-contact>${devContact}</sla:dev-contact>
+              <sla:qa-contact>${qaContact}</sla:qa-contact>
+              <sla:se-contact>${seContact}</sla:se-contact>
+              <sla:alert-frequency>${alertFrequency}</sla:alert-frequency>
+              <sla:alert-percentage>${alertPercentage}</sla:alert-percentage>
+              <sla:upstream-apps>${upstreamApps}</sla:upstream-apps>
+    </sla:info>
+</action>
+</coordinator-app>
+

Added: oozie/trunk/examples/src/main/apps/sla/job.properties
URL: http://svn.apache.org/viewvc/oozie/trunk/examples/src/main/apps/sla/job.properties?rev=1454079&view=auto
==============================================================================
--- oozie/trunk/examples/src/main/apps/sla/job.properties (added)
+++ oozie/trunk/examples/src/main/apps/sla/job.properties Thu Mar  7 20:18:50 2013
@@ -0,0 +1,40 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+nameNode=hdfs://localhost:8020
+jobTracker=localhost:8021
+queueName=default
+examplesRoot=examples
+
+oozie.coord.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/sla/coordinator.xml
+start=2010-01-01T01:00Z
+end=2010-01-01T03:00Z
+
+appName=sla-app
+# shouldStart in minutes, expected start time defined as coord action's nominal time + shouldStart
+shouldStart=1
+# shouldEnd in minutes, expected end time defined as coord action's nominal time + shouldEnd
+shouldEnd=5
+notificationMsg=Notification Message
+alertContact=alert@oozie.com
+devContact=dev@oozie.com
+qaContact=qa@oozie.com
+seContact=se@oozie.com
+alertFrequency=LAST_HOUR
+alertPercentage=80
+upstreamApps=applicaion-a,application-b

Added: oozie/trunk/examples/src/main/apps/sla/workflow.xml
URL: http://svn.apache.org/viewvc/oozie/trunk/examples/src/main/apps/sla/workflow.xml?rev=1454079&view=auto
==============================================================================
--- oozie/trunk/examples/src/main/apps/sla/workflow.xml (added)
+++ oozie/trunk/examples/src/main/apps/sla/workflow.xml Thu Mar  7 20:18:50 2013
@@ -0,0 +1,21 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<workflow-app xmlns="uri:oozie:workflow:0.2" name="no-op-wf">
+    <start to="end"/>
+    <end name="end"/>
+</workflow-app>

Modified: oozie/trunk/release-log.txt
URL: http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1454079&r1=1454078&r2=1454079&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Thu Mar  7 20:18:50 2013
@@ -4,6 +4,7 @@ OOZIE-1239 Bump up trunk to 4.1.0-SNAPSH
 
 -- Oozie 4.0.0 (unreleased)
 
+OOZIE-1191 add examples of coordinator with SLA tag inserted (ryota via mona)
 OOZIE-1204 Illustrate correct use of parameters inside SLA tags (jun aoki via mona)
 OOZIE-1255 latest/future check for hcat can cause shutdown to hang (rohini via virag)
 OOZIE-1253 latest() gets resolved before all push dependencies are resolved (rohini via virag)