11

我是 oozie 的新手,在更改 oozie 默认时区时遇到问题。我正在编写 oozie 协调员工作,并尝试指定时区,例如

<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">

正如这里解释的那样http://oozie.apache.org/docs/3.2.0-incubating/CoordinatorFunctionalSpec.html#a4._Datetime_Frequency_and_Time-Period_Representation 但它不起作用。谁能告诉我哪里出错了?

其次,我想在 oozie 工作流程开始时获取日期时间。假设我想在过去的某个日期运行协调员工作,比如一周前,该工作以 15 分钟的频率运行了一整天。我想要的是在工作流程开始时有日期时间。

非常感谢您宝贵的时间

4

3 回答 3

1

您可以在您的

oozie-site.xml

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

于 2013-06-17T11:44:18.087 回答
1

你也可以试试这个:

$ oozie info -timezones<br><br>

格式为“SHORT_NAME (ID)”。

将 ID 提供给 -timezone 参数。

也可以使用 GMT 偏移量(例如 GMT-07:00、GMT-0700、GMT+05:30、GMT+0530)

可用时区:

  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>
  ...      

如果您需要的时区低于此命令给定的时区,您可以直接在协调器中使用它。

于 2016-04-07T06:48:06.770 回答
0

你好朱奈德和 ygnhzeus,

为了在 oozie 中更改您的时区,您只需在 oozie-default.xml 文件中更改默认时区。

**<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>**

现在只需停止 oozie 并重新启动它。谢谢您,数据工程师 Amudhan K。

于 2014-01-17T19:08:38.020 回答