You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by rk...@apache.org on 2013/02/04 19:02:14 UTC

svn commit: r1442239 - in /oozie/branches/branch-3.3/examples/src/main/apps/aggregator: coordinator-with-offset.xml job-with-offset.properties

Author: rkanter
Date: Mon Feb  4 18:02:14 2013
New Revision: 1442239

URL: http://svn.apache.org/viewvc?rev=1442239&view=rev
Log:
OOZIE-1028 Amendment, adding missing 2 new files to examples

Added:
    oozie/branches/branch-3.3/examples/src/main/apps/aggregator/coordinator-with-offset.xml
    oozie/branches/branch-3.3/examples/src/main/apps/aggregator/job-with-offset.properties

Added: oozie/branches/branch-3.3/examples/src/main/apps/aggregator/coordinator-with-offset.xml
URL: http://svn.apache.org/viewvc/oozie/branches/branch-3.3/examples/src/main/apps/aggregator/coordinator-with-offset.xml?rev=1442239&view=auto
==============================================================================
--- oozie/branches/branch-3.3/examples/src/main/apps/aggregator/coordinator-with-offset.xml (added)
+++ oozie/branches/branch-3.3/examples/src/main/apps/aggregator/coordinator-with-offset.xml Mon Feb  4 18:02:14 2013
@@ -0,0 +1,77 @@
+<!--
+  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-with-offset" frequency="${coord:hours(1)}" start="${start}" end="${end}" timezone="UTC"
+                 xmlns="uri:oozie:coordinator:0.2">
+    <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">
+            <!--based on frequency, initial-instance, start time, and end time, the following will resolve to a range between
+            ${coord:offset(-40, "MINUTE")} (or equivalently ${coord:current(-2)}) and ${coord:current(0)}-->
+            <start-instance>${coord:offset(-42, "MINUTE")}</start-instance>
+            <end-instance>${coord:offset(0, "HOUR")}</end-instance>
+        </data-in>
+    </input-events>
+
+    <output-events>
+        <data-out name="output" dataset="aggregated-logs">
+            <!--based on frequency, initial-instance, start time, and end time, the following will resolve to ${coord:current(0)}-->
+            <instance>${coord:offset(1, "MINUTE")}</instance>
+        </data-out>
+    </output-events>
+
+    <action>
+        <workflow>
+            <app-path>${nameNode}/user/${coord:user()}/${examplesRoot}/apps/aggregator</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>
+    </action>
+</coordinator-app>
+

Added: oozie/branches/branch-3.3/examples/src/main/apps/aggregator/job-with-offset.properties
URL: http://svn.apache.org/viewvc/oozie/branches/branch-3.3/examples/src/main/apps/aggregator/job-with-offset.properties?rev=1442239&view=auto
==============================================================================
--- oozie/branches/branch-3.3/examples/src/main/apps/aggregator/job-with-offset.properties (added)
+++ oozie/branches/branch-3.3/examples/src/main/apps/aggregator/job-with-offset.properties Mon Feb  4 18:02:14 2013
@@ -0,0 +1,28 @@
+#
+# 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/aggregator/coordinator-with-offset.xml
+start=2010-01-01T01:00Z
+end=2010-01-01T03:00Z
+
+