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

你可能感兴趣的:(Oozie的安装)