Skip to content
Find file
a6ed33b Sep 14, 2012
59 lines (56 sloc) 2.47 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
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="add-partition-coord" frequency="${coord:hours(1)}"
start="${jobStart}" end="${jobEnd}"
timezone="UTC"
xmlns="uri:oozie:coordinator:0.1">
<datasets>
<dataset name="tweets" frequency="${coord:hours(1)}"
initial-instance="${initialDataset}" timezone="America/Los_Angeles">
<uri-template>hdfs://hadoop1:8020/user/flume/tweets/${YEAR}/${MONTH}/${DAY}/${HOUR}</uri-template>
<done-flag></done-flag>
</dataset>
</datasets>
<input-events>
<data-in name="input" dataset="tweets">
<instance>${coord:current(coord:tzOffset() / 60)}</instance>
</data-in>
<data-in name="readyIndicator" dataset="tweets">
<!-- I've done something here that is a little bit of a hack. Since Flume
doesn't have a good mechanism for notifying an application of when it has
rolled to a new directory, we can just use the next directory as an
input event, which instructs Oozie not to kick off a coordinator
action until the next dataset starts being available. -->
<instance>${coord:current(1 + (coord:tzOffset() / 60))}</instance>
</data-in>
</input-events>
<action>
<workflow>
<app-path>${workflowRoot}/hive-action.xml</app-path>
<configuration>
<property>
<name>wfInput</name>
<value>${coord:dataIn('input')}</value>
</property>
<property>
<name>dateHour</name>
<value>${coord:formatTime(coord:dateOffset(coord:nominalTime(), tzOffset, 'HOUR'), 'yyyyMMddHH')}</value>
</property>
</configuration>
</workflow>
</action>
</coordinator-app>
Something went wrong with that request. Please try again.