Oozie的安装

  • hadoop中core-site.xml配置

    <!--oozie配置-->
    <property>
      <name>hadoop.proxyuser.ycong.hosts</name>
      <value>*</value>
    </property>
    <property>
      <name>hadoop.proxyuser.ycong.groups</name>
      <value>*</value>
    </property> 
  • 解压oozie-4.0.0-cdh5.3.6下的oozie-hadooplibs-4.0.0-cdh5.3.6.tar.gz
    tar -zxf oozie-hadooplibs-4.0.0-cdh5.3.6.tar.gz -C ../

  • 在oozie-4.0.0-cdh5.3.6下创建目录libext/
    mkdir -p libext
  • 拷贝lib包到libext下

    cp /opt/app/cdh5.3.6/oozie-4.0.0-cdh5.3.6/hadooplibs/hadooplib-2.5.0-cdh5.3.6.oozie-4.0.0-cdh5.3.6/* /opt/app/cdh5.3.6/oozie-4.0.0-cdh5.3.6/libext
  • 拷贝ext-2.2.zip到libext下
    cp /home/ycong/ext-2.2.zip /opt/app/cdh5.3.6/oozie-4.0.0-cdh5.3.6/libext

  • creating war files for oozie with an optional alternative directory other than libext
    bin/oozie-setup.sh prepare-war

  • 初始化oozie数据库
    bin/ooziedb.sh create -sqlfile oozie.sql -run
  • 创建jar包存放位置

    bin/oozie-setup.sh sharelib create \
    -fs hdfs://bigdata.eclipse.com:8020 \
    -locallib oozie-sharelib-4.0.0-cdh5.3.6-yarn.tar.gz
  • 启动oozie
    bin/oozied.sh start

  • 运行一个example

1) modify job.properties
    nameNode=hdfs://bigdata.eclipse.com:8020
    jobTracker=bigdata.eclipse.com:8032
    queueName=default
    examplesRoot=examples

    oozie.wf.application.path=${nameNode}/user/ycong/${examplesRoot}/apps/map-reduce/workflow.xml
    outputDir=map-reduce
2)/opt/app/cdh5.3.6/hadoop-2.5.0-cdh5.3.6/bin/hdfs dfs -put examples/ examples
3)modify oozie-site.xml
<property>
        <name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
        <value>*=/opt/app/cdh5.3.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>
3)运行:
export OOZIE_URL=http://bigdata.eclipse.com:11000/oozie/
bin/oozie job -config examples/apps/map-reduce/job.properties -run
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值