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 23 oozie.processing.timezone 4GMT+0800 5
12 oozie.service.coord.check.maximum.frequency 3false 4
上面设置只是设置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.011 #12 # Unless required by applicable law or agreed to in writing, software13 # 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 and16 # limitations under the License.17 #18 19 nameNode=hdfs://hadoop:802020 jobTracker=hadoop:803221 queueName=default22 oozieAppsRoot=user/root/oozie-apps23 oozieDataRoot=user/root/oozie/datas24 25 oozie.coord.application.path=${nameNode}/${oozieAppsRoot}/cron-schedule26 start=2015-10-11T20:25+080027 end=2015-10-11T20:30+080028 workflowAppUri=${nameNode}/${oozieAppsRoot}/cron-schedule
5:修改coordinator.xml
1 1821 22 4023 39${workflowAppUri} 2425 3826 29jobTracker 27${jobTracker} 2830 33nameNode 31${nameNode} 3234 37queueName 35${queueName} 36
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:启动运行