码迷,mamicode.com
首页 > 其他好文 > 详细

Oozie与Coordinator调度讲解及系统时区配置与定时触发两种配置方式

时间:2017-12-20 22:11:36      阅读:428      评论:0      收藏:0      [点我收藏+]

标签:post   orm   over   frequency   rmi   site   iss   form   ice   

1:修改本地linux时区

  查看时区

   - 号代表西  + 号 代表东 北京时间是东八区

技术分享图片

    设置时区的配置文件所在位置

1 cd /usr/share/zoneinfo/

技术分享图片

    选择以亚洲的上海 的时区为基址

技术分享图片

    删除本地配置文件

1 rm -r /etc/localtime 

技术分享图片

    创建一个硬连接

1  ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

技术分享图片

   时区变成东八区了

技术分享图片

   设置时间

技术分享图片

2:设置oozie的时区   在oozie-site.xml修改  oozie默认使用UTC 等同于GMT 服务器上是CST  要设置成GMT+0800

  

1  <!-- Time Zone -->
2  <property>
3      <name>oozie.processing.timezone</name>
4      <value>GMT+0800</value>
5   </property>

  

1  <property>
2      <name>oozie.service.coord.check.maximum.frequency</name>
3      <value>false</value>
4   </property>

 

 技术分享图片

 

技术分享图片

 

 

上面设置只是设置oozie调度的时间   oozie的web控制台时间也需要改

修改 oozie-console.js

技术分享图片

在179行  getTimeZone

技术分享图片

 

 启动之前要先清除缓存

技术分享图片

3:拷贝模板

技术分享图片

4:修改job.properties

 1 #
 2 # Licensed to the Apache Software Foundation (ASF) under one
 3 # or more contributor license agreements.  See the NOTICE file
 4 # distributed with this work for additional information
 5 # regarding copyright ownership.  The ASF licenses this file
 6 # to you under the Apache License, Version 2.0 (the
 7 # "License"); you may not use this file except in compliance
 8 # with the License.  You may obtain a copy of the License at
 9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18 
19 nameNode=hdfs://hadoop:8020
20 jobTracker=hadoop:8032
21 queueName=default
22 oozieAppsRoot=user/root/oozie-apps
23 oozieDataRoot=user/root/oozie/datas
24 
25 oozie.coord.application.path=${nameNode}/${oozieAppsRoot}/cron-schedule
26 start=2015-10-11T20:25+0800
27 end=2015-10-11T20:30+0800
28 workflowAppUri=${nameNode}/${oozieAppsRoot}/cron-schedule

 5:修改coordinator.xml

 1 <!--
 2   Licensed to the Apache Software Foundation (ASF) under one
 3   or more contributor license agreements.  See the NOTICE file
 4   distributed with this work for additional information
 5   regarding copyright ownership.  The ASF licenses this file
 6   to you under the Apache License, Version 2.0 (the
 7   "License"); you may not use this file except in compliance
 8   with the License.  You may obtain a copy of the License at
 9 
10        http://www.apache.org/licenses/LICENSE-2.0
11 
12   Unless required by applicable law or agreed to in writing, software
13   distributed under the License is distributed on an "AS IS" BASIS,
14   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   See the License for the specific language governing permissions and
16   limitations under the License.
17 -->
18 <coordinator-app name="cron-coord" frequency="${coord:minutes(1)}" 
19                 start="${start}" end="${end}" timezone="GMT+0800"
20                 xmlns="uri:oozie:coordinator:0.4">
21         <action>
22         <workflow>
23             <app-path>${workflowAppUri}</app-path>
24             <configuration>
25                 <property>
26                     <name>jobTracker</name>
27                     <value>${jobTracker}</value>
28                 </property>
29                 <property>
30                     <name>nameNode</name>
31                     <value>${nameNode}</value>
32                 </property>
33                 <property>
34                     <name>queueName</name>
35                     <value>${queueName}</value>
36                 </property>
37             </configuration>
38         </workflow>
39     </action>
40 </coordinator-app>

 6.把文件上传至hdfs

1 bin/hdfs dfs -put /opt/cdh-5.3.6/oozie-4.0.0-cdh5.3.6/oozie-apps/cron-schedule oozie-apps/

 技术分享图片

技术分享图片

 7:启动运行

Oozie与Coordinator调度讲解及系统时区配置与定时触发两种配置方式

标签:post   orm   over   frequency   rmi   site   iss   form   ice   

原文地址:http://www.cnblogs.com/xuyou551/p/8075711.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!