When you reference the data set for your data-in or data-out elements, use the
EL function coord:current() to reference the right instance. I also use Pacific
time so my coordinators use data-in elements that look like this:
<data-in name="CleanResult" dataset="Results">
<instance>${coord:current(-32)}</instance>
</data-in>
In that example the coordinator is run on 15 minute intervals and I want 8
hours 'behind' UTC so 4*8 = 32 is how many instances to go 'back'.
Note that this requires resubmittal of the coordinator when the time changes,
there is a time zone offset EL function that could be used but it is broken in
the oozie version I have but apparently fixed as of v4.0.
(https://issues.apache.org/jira/browse/OOZIE-1573)
Hope that helps,
Paul
-----Original Message-----
From: anil gupta [mailto:[email protected]]
Sent: Monday, January 05, 2015 1:17 PM
To: [email protected]
Subject: Dataset uri-template "${YEAR}/${MONTH}/${DAY}/${HOUR}" in PST timezone?
Hi
I have a dataset "A" that has an uri
/user/oozie/${YEAR}/${MONTH}/${DAY}/${HOUR}.
<dataset name="inv" frequency="5" initial-instance="${startDate}"
timezone="America/Los_Angeles">
<uri-template>/user/oozie/${YEAR}/${MONTH}/${DAY}/${HOUR}</uri-template>
<done-flag>_READY</done-flag>
</dataset>
When the coordinator is resolving time for "${YEAR}/${MONTH}/${DAY}/${HOUR}",
its resolving it in UTC. I want the coordinator to consider America/Los_Angeles
time while building the folder path.
Can you please let me know how to do this?
Here is the definition of coordinator app:
<coordinator-app name="proc-coordinator"
timezone="America/Los_Angeles"
frequency="5"
start="${startDate}"
end="${endDate}"
xmlns="uri:oozie:coordinator:0.2">
--
Thanks & Regards,
Anil Gupta