@tsing1226
2016-05-09T14:18:51.000000Z
字数 2684
阅读 1483
oozie
配置core-site.xml
<!-- OOZIE -->
<property>
<name>hadoop.proxyuser.grc.hosts</name>
<value>hadoop-senior01.grc.com</value>
</property>
<property>
<name>hadoop.proxyuser.grc.groups</name>
<value>*</value>
</property>
> tar -zxf oozie-hadooplibs-4.0.0-cdh5.3.6.tar.gz -C /opt/cdh3.5.6/
mkdir libext
cp -r hadooplibs/hadooplib-2.5.0-cdh5.3.6.oozie-4.0.0-cdh5.3.6/* libext/
cp -r /opt/softwares/ext-2.2.zip libext/
bin/oozie-setup.sh prepare-war
bin/oozie-setup.sh sharelib create -fs \
hdfs://hadoop-senior01.grc.com:8020 \
-locallib oozie-sharelib-4.0.0-cdh5.3.6-yarn.tar.gz
bin/ooziedb.sh create -sqlfile oozie.sql -run DB Connection
bin/oozied.sh start
bin/oozie admin -oozie http://hadoop-senior01.grc.com:11000/oozie -status
oozie example
tar -zxf oozie-examples.tar.gz
/opt/cdh3.5.6/hadoop-2.5.0-cdh5.3.6/bin/hdfs dfs -put examples examples
> 注意:如果上传之前HDFS文件系统中存在,先删除后上传。
- 修改配置文件job.properties
nameNode=hdfs://hadoop-senior01.grc.com:8020
jobTracker=hadoop-senior01.grc.com:8032
- 运行方式一
bin/oozie job -oozie http://hadoop-senior01.grc.com:11000/oozie -config examples/apps/map-reduce/job.properties -run
运行方式二
- 设置环境变量
export OOZIE_URL=http://hadoop-senior01.grc.com:11000/oozie/
直接运行
bin/oozie job -config examples/apps/map-reduce/job.properties -run
运行产生job id为 0000000-151219080030057-oozie-grc-W
- 查看workflow job状态
bin/oozie job -oozie http://hadoop-senior01.grc.com:11000/oozie -info 0000000-151219080030057-oozie-grc-W
Error starting action [mr-node]. ErrorType [FAILED], ErrorCode [It should never happe
n], Message [File /user/grc/share/lib does not exist]
org.apache.oozie.action.ActionExecutorException: File /user/grc/share/lib does not exist
<property>
<name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
<value>*=/opt/cdh3.5.6/hadoop-2.5.0-cdh5.3.6/etc/hadoop/</value>
<description>
Comma separated AUTHORITY=HADOOP_CONF_DIR, where AUTHORITY is the HOST:PORT of
the Hadoop service (JobTracker, HDFS). The wildcard '*' configuration is
used when there is no exact match for an authority. The HADOOP_CONF_DIR contains
the relevant Hadoop *-site.xml files. If the path is relative is looked within
the Oozie configuration directory; though the path can be absolute (i.e. to point
to Hadoop client conf/ directories in the local filesystem.
</description>
</property>
bin/oozied.sh stop
bin/oozied.sh start
bin/oozie job -oozie http://hadoop-senior01.grc.com:11000/oozie -config examples/apps/map-reduce/job.properties -run
export OOZIE_URL=http://hadoop-senior01.grc.com:11000/oozie/
bin/oozie job -config examples/apps/map-reduce/job.properties -run
bin/oozie job -info 0000000-151219080030057-oozie-grc-W