统一 Cloudera Manager、Hue和Oozie的时区

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_43215250/article/details/90522602
  1. 查看Cloudera Manager时区
    在这里插入图片描述
    在这里插入图片描述

  2. 修改Cloudera Manager时区

    1. 查看Cloudera Manager Server 服务器时区

      [root@cdh01 ~]# timedatectl
           Local time: 五 2019-05-24 12:19:36 UTC          
        Universal time: 五 2019-05-24 12:19:36 UTC
              RTC time: 五 2019-05-24 12:19:36
             Time zone: Asia/Shanghai (CST, +0800)
           NTP enabled: yes
      NTP synchronized: yes
       RTC in local TZ: no
            DST active: n/a
      

      查看支持的时区列表

      timedatectl list-timezones
      
    2. 设置服务器时区

      [root@cdh01 ~]# timedatectl set-timezone Asia/Shanghai
      [root@cdh01 ~]# timedatectl
            Local time: 五 2019-05-24 20:30:55 CST
        Universal time: 五 2019-05-24 12:30:55 UTC
              RTC time: 五 2019-05-24 12:30:55
             Time zone: Asia/Shanghai (CST, +0800)
           NTP enabled: yes
      NTP synchronized: yes
       RTC in local TZ: no
            DST active: n/a
      

      确保CDH集群的所有服务器时区均已设置为相同时区。

    3. 重启Cloudera Manager Serve

      [root@cdh01 ~]# systemctl restart cloudera-scm-server
      

    在这里插入图片描述

  3. 查看Hue时区

    Hue --> 配置 --> 搜索 time。
    默认时区为 America/Los_Angeles
    在这里插入图片描述

  4. 修改Hue时区

    将America/Los_Angeles 修改为 Asia/Shanghai ,保存更改后重启 Hue 服务。 在这里插入图片描述

  5. 设置Oozie时区

    Oozie默认时区为UTC 。

    Oozie --> 配置 --> 搜索 oozie-site.xml --> 高级配置 --> 添加配置 --> 保存更改 --> 重启 oozie 服务。

    <property>
    	<name>oozie.processing.timezone</name>
    	<value>GMT+0800</value>
    	<description>时区设置</description>
    </property>
    

    在这里插入图片描述

至此,将Cloudera Manager、Hue和Oozie的时区统一为 CST 。

猜你喜欢

转载自blog.csdn.net/weixin_43215250/article/details/90522602
今日推荐