Database Reference
In-Depth Information
The Definition tab in the Figure 5-11 window contains the contents of the job's coordinator.xml file. The
Configuration tab contains all of the job's parameters in XML from the configuration file. And the Log tab contains the
job's log entries.
As an extension to this coordinator job, I add a dataset requirement and create a new data set variable, as follows:
DataJobFreq=1440
And the XML now looks like this:
1 <coordinator-app
2
3 name="FuelWorkFlowCoord"
4 frequency="${JobFreq}"
5 start="${jobStart}"
6 end="${jobEnd}"
7 timezone="${jobNZTimeZone}"
8 xmlns="uri:Oozie workflow:coordinator:0.4">
9
10 <datasets>
11 <dataset
12
13 name="vehicle"
14 frequency="${DataJobFreq}"
15 initial-instance="${jobStart}"
16 timezone="${jobNZTimeZone}">
17
18 <uri-template>${hdfsRawData}/${YEAR}_${MONTH}_${DAY}_Fuel_Consumption</uri-template>
19 </dataset>
20 </datasets>
21
22 <action>
23 <workflow>
24 <app-path>${oozieWfPath}/workflow.xml</app-path>
25 </workflow>
26 </action>
27
28 </coordinator-app>
The data set requirement is added between lines 10 and 20, using the hdfsPathRawData variable from
the configuration file and the predefined YEAR , MONTH , and DAY variables. So, if the file for July 13, 2014
(${hdfsRawData}/2014_07_13_Fuel_Consumption ) is not available in the rawdata directory, then the job will not run.
This section has provided a brief introduction, via examples, for you to sample Oozie. For a full definition of
workflow specification, you should check the Oozie website at oozie.apache.org . Choose the documentation level
that matches your Oozie installation; there is a detailed specification there for workflow and coordinator jobs. You
could also investigate bundler jobs, which allow you to group coordinator jobs.
 
Search WWH ::




Custom Search