Browse files

Making the timezone offset a configured job property

  • Loading branch information...
1 parent 2015b85 commit a6ed33b3673fdb4298e8d1fb04545075ebebad84 Jon Natkins committed Sep 14, 2012
Showing with 7 additions and 6 deletions.
  1. +3 −5 oozie-workflows/coord-app.xml
  2. +4 −1 oozie-workflows/
@@ -19,7 +19,7 @@
<coordinator-app name="add-partition-coord" frequency="${coord:hours(1)}"
start="${jobStart}" end="${jobEnd}"
- xmlns="uri:oozie:coordinator:0.1">
+ xmlns="uri:oozie:coordinator:0.1">
<dataset name="tweets" frequency="${coord:hours(1)}"
initial-instance="${initialDataset}" timezone="America/Los_Angeles">
@@ -29,13 +29,11 @@
<data-in name="input" dataset="tweets">
- <!-- The integer value here should be the offset of your time zone from GMT,
- so for PT, this value is -8 -->
<instance>${coord:current(coord:tzOffset() / 60)}</instance>
<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 when its
+ 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. -->
@@ -52,7 +50,7 @@
- <value>${coord:formatTime(coord:dateOffset(coord:nominalTime(), -8, 'HOUR'), 'yyyyMMddHH')}</value>
+ <value>${coord:formatTime(coord:dateOffset(coord:nominalTime(), tzOffset, 'HOUR'), 'yyyyMMddHH')}</value>
@@ -21,12 +21,15 @@ workflowRoot=${nameNode}/user/${}/oozie-workflows
# jobStart and jobEnd must be in UTC, because Oozie does not yet support
# custom timezones
# This should be set to an hour boundary. In this case, it is set to 8 hours
# before the jobStart, since PST is GMT-8
+# Timezone offset between UTC and the server timezone

0 comments on commit a6ed33b

Please sign in to comment.