Reputation: 111
i am new to oozie and having problem in changing oozie default time zone. I am writing oozie coordinator job and have tried to specify timezone like
<coordinator-app name="hello-coord" frequency="${coord:days(1)}"
start="2009-01-02T08:00Z" end="2009-01-04T08:00Z" timezone="GMT+05:30"
xmlns="uri:oozie:coordinator:0.1">
as explained here http://oozie.apache.org/docs/3.2.0-incubating/CoordinatorFunctionalSpec.html#a4._Datetime_Frequency_and_Time-Period_Representation but it does not work. Can anyone please tell me where do i go wrong?
Secondly, i want to get date time when the oozie workflow starts. Suppose i want to run a coordinator job for a past date, say a week ago, that job ran for a whole day with frequency of 15 mins. what i want is to have date time at the time when the workflow started.
Thank you very much for your precious time
Upvotes: 11
Views: 11835
Reputation: 41
You can try this also:
$ oozie info -timezones<br><br>
The format is "SHORT_NAME (ID)".
Give the ID to the -timezone argument.
GMT offsets can also be used (e.g. GMT-07:00, GMT-0700, GMT+05:30, GMT+0530)
Available Time Zones :
SST (Pacific/Midway)<br>
NUT (Pacific/Niue)<br>
SST (Pacific/Pago_Pago)<br>
SST (Pacific/Samoa)<br>
SST (US/Samoa)<br>
HAST (America/Adak)<br>
HAST (America/Atka)<br>
HST (HST)<br>
...
If the timezone you require falls under one given by this command you can directly use it in your coordinator.
Upvotes: 1
Reputation: 1
Hello Junaid and ygnhzeus,
In order to Change your timezone in oozie, all you need is to go and change the default time zone in oozie-default.xml file.
**<property>
<name>oozie.processing.timezone</name>
<value>GMT+0530</value>
<description>
Oozie server timezone. Valid values are UTC and GMT(+/-)####, for example 'GMT+0530' would be India
timezone. All dates parsed and genered dates by Oozie Coordinator/Bundle will be done in the specified
timezone. The default value of 'UTC' should not be changed under normal circumtances. If for any reason
is changed, note that GMT(+/-)#### timezones do not observe DST changes.
</description>
</property>**
Now just stop the oozie and restart it again. Thank You, Amudhan K, Data Engineer.
Upvotes: 0
Reputation: 367
you may set this property in your
oozie-site.xml
<property>
<name>oozie.processing.timezone</name>
<value>GMT+0400</value>
</property>
Upvotes: 1