11

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

Junaid
  • 111
  • 1
  • 1
  • 3

3 Answers3

1

you may set this property in your

oozie-site.xml

<property> <name>oozie.processing.timezone</name> <value>GMT+0400</value> </property>

ygnhzeus
  • 367
  • 1
  • 2
  • 14
1

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.

gvlasov
  • 18,638
  • 21
  • 74
  • 110
Ankur Kant
  • 41
  • 6
  • in case anyone is looking for this, you can do the following in order to print the oozie job info with your preferred timezone: oozie job -info -timezone EST – adbar Nov 13 '17 at 19:24
  • I never got the GMT formatting to work. According to Oozie documentation, Oozie works exclusively with the UTC timezone. Therefore, I had to add my timezone offset to GMT+0000 and submit that as `start="YYYY-MM-DDThh:mmZ"` – Andrew Kirna Dec 04 '18 at 14:44
0

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.