oozie的安装

hadoop dfsadmin -report 


hadoop dfsadmin -refreshNodes


(1).配置Hadoop的 core-site.xml 文件,具体配置内容如下:
      
<property>
    <name>hadoop.proxyuser.[OOZIE_SERVER_USER].hosts</name>
    <value>[OOZIE_SERVER_HOSTNAME]</value>
  </property>
  <property>
    <name>hadoop.proxyuser.[OOZIE_SERVER_USER].groups</name>
    <value>[USER_GROUPS_THAT_ALLOW_IMPERSONATION]</value>
  </property>
注释:[OOZIE_SERVER_USER]填写访问Tomcat的用户名
    [OOZIE_SERVER_HOSTNAME]填写安装Tomcat服务器的机器的主机名
    [USER_GROUP_THAT_ALLOW_TMPERSONATION]一般填写*标识符,表示所用用户都可以访问




<!--oozie配置-->
<property>
    <name>hadoop.proxyuser.hadoop.hosts</name>
    <value>*</value>
    </property>
<property>
    <name>hadoop.proxyuser.hadoop.groups</name>
    <value>*</value>
</property>


修改oozie-site.xml


    <property>
        <name>oozie.service.JPAService.jdbc.driver</name>
        <value>com.mysql.jdbc.Driver</value>
    </property>
    <property>
        <name>oozie.service.JPAService.jdbc.url</name>
        <value>jdbc:mysql://192.168.8.50:3306/oozie</value>
        <description>
            JDBC URL.
        </description>
    </property>


    <property>
        <name>oozie.service.JPAService.jdbc.username</name>
        <value>oozie</value>
        <description>
            DB user name.
        </description>
    </property>


    <property>
        <name>oozie.service.JPAService.jdbc.password</name>
        <value>oozie</value>
        <description>
            DB user password.


            IMPORTANT: if password is emtpy leave a 1 space string, the service trims the value,
                       if empty Configuration assumes it is NULL.
        </description>
    </property>




    <property>
        <name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
        <value>*=/hadoopdata1/soft/hadoop/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>


<property>
   <name>oozie.processing.timezone</name>
   <value>GMT+0800</value>
   <description>这个是设置时区,很重要,否则创建定时任务会有麻烦</description>
</property>




8)打war包


bin/oozie-setup.sh prepare-war


9)将oozie运行过程中需要的依赖包共享到hdfs上


bin/oozie-setup.sh sharelib create -fs hdfs://e6cluster -locallib oozie-sharelib-4.1.0-cdh5.9.0-yarn.tar.gz
10)初始化mysql oozie库


bin/oozie-setup.sh db create-run oozie.sql


11)启动检测运行


bin/oozied.sh start 


ps -ef | grep oozie


netstat -tlnup | grep 11000


12)访问web ui


http://192.168.8.53:11000/oozie/


13)测试例子
hadoop fs -copyFromLocal /hadoopdata1/soft/oozie-4.1.0-cdh5.9.0/examples  /user/hadoop




./oozie mapreduce -oozie http://localhost:11000/oozie -config /hadoopdata1/soft/oozie-4.1.0-cdh5.9.0/examples/apps/map-reduce/job.properties -run


./oozie job -oozie http://localhost:11000/oozie -config /hadoopdata1/soft/oozie-4.1.0-cdh5.9.0/examples/apps/map-reduce/job.properties -run




sudo -u hadoop hadoop job  -oozie http://localhost:11000/oozie -config /hadoopdata1/soft/oozie-4.1.0-cdh5.9.0/examples/apps/map-reduce/job.properties -run


nameNode=hdfs://e6cluster
jobTracker=worker1:8032
queueName=default
examplesRoot=examples
user.name=hu


oozie.wf.application.path=/user/hu/examples/apps/map-reduce/workflow.xml
outputDir=map-reduce
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值