搭建Ozzie环境

1) build
## download oozie-5.2.1.tar.gz from http://archive.apache.org/dist/
## unpack to ~/work/oozie-src-5.2.1
$ cd ~/work/oozie-src-5.2.1
$ diff pom.xml.orig pom.xml         # modify according to hadoop version
83c83
<         <hadoop.version>2.6.0</hadoop.version>
---
>         <hadoop.version>2.8.0</hadoop.version>
$ bin/mkdistro.sh -Puber -DskipTests
## the tar ball distro/target/oozie-5.2.1-distro.tar.gz should be create

2) install
$ cd ~/work
$ tar xvf oozie-src-5.2.1/distro/target/oozie-5.2.1-distro.tar.gz
$ cd oozie-5.2.1
## download ExtJS 2.2 library to enable Oozie web console
## http://archive.cloudera.com/gplextras/misc/ext-2.2.zip
$ mkdir libext
$ cp ../downloads/ext-2.2.zip libext

3) configure
## modify oozie-site.xml
$ diff conf/oozie-site.xml.orig conf/oozie-site.xml
65c65,68
>     <property>
>         <name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
>         <value>*=/Users/sun_xo/work/hadoop/etc/hadoop/</value>
>     </property>

## modify core-site.xml and restart hadoop
$ cd ~/work/hadoop
$ mr.sh stop yarn
$ diff -r myconf/core-site.xml etc/hadoop/core-site.xml
27a28,36
>     <!-- OOZIE -->
>     <property>
>         <name>hadoop.proxyuser.sun_xo.hosts</name>
>         <value>localhost</value>
>     </property>
>     <property>
>         <name>hadoop.proxyuser.sun_xo.groups</name>
>         <value>*</value>
>     </property>
$ mr.sh start yarn

## upload sharelib to hdfs
$ cd ~/work/oozie-5.2.1
$ bin/oozie-setup.sh sharelib create -fs hdfs://localhost:9000 -locallib oozie-sharelib-5.2.1.tar.gz
## check result on http://localhost:50070/explorer.html#/user/sun_xo/share

## create oozie db (in derby as default)
$ cd ~/work/oozie-5.2.1
$ bin/ooziedb.sh create -sqlfile oozie.sql -run

4) start oozie
$ bin/oozied.sh start       # check by jps - check EmbeddedOozieServer
$ bin/oozie admin -oozie http://localhost:11000/oozie -status
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
System mode: NORMAL
## check result on http://localhost:11000/oozie/

5) run case
## prepare examples
$ cd ~/work/oozie-5.2.1
$ tar xvf oozie-examples.tar.gz
$ hdfs dfs -put examples /user/sun_xo/examples  # upload examples
$ cd examples/apps/map-reduce                   # modify job.properties
$ diff job.properties.orig job.properties
19c19
< nameNode=hdfs://localhost:8020
---
> nameNode=hdfs://localhost:9000

## run a map-reduce case in examples
$ cd ~/work/oozie-5.2.1
$ export OOZIE_URL=http://localhost:11000/oozie
$ bin/oozie job -config examples/apps/map-reduce/job.properties -run
job: 0000000-220523112321053-oozie-sun_-W
## check result by job id or check on http://localhost:11000/oozie/
$ bin/oozie job -info 0000000-220523112321053-oozie-sun_-W
$ hdfs dfs -cat "/user/sun_xo/examples/output-data/map-reduce/*"

6) stop oozie
$ bin/oozied.sh stop        # check by jps

reference: https://oozie.apache.org/docs/5.2.1/index.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值