Oozie初探

参考博客:

1、本人是CDH版本,安装省略

2、找到example包

a)find / -name oozie-examples.tar.gz

b)/opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/share/doc/oozie-4.1.0+cdh5.12.1+446/oozie-examples.tar.gz

3、复制到 oozie_job目录

copy /opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/share/doc/oozie-4.1.0+cdh5.12.1+446/oozie-examples.tar.gz  oozie_job

tar oozie-examples.tar.gz 

4、复制一个shell案例(examples/apps 目录下面很多案例,这里以shell为例)

cp -r  examples/apps/shell/  oozie_job/

5、job.properties配置

nameNode=hdfs://uat-datacenter1:8020  #修改
jobTracker=uat-datacenter3:8032  #修改
queueName=default  
examplesRoot=example  

oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}  #根据hdfs上传得脚本路径修改

6、执行

删除文件
hdfs dfs -rm -R  /user/root/shell
上传文件
hdfs dfs -put oozie_job/shell /user/root

a) 执行
oozie job -oozie http://uat-datacenter2:11000/oozie/  -config shell/job.properties -run

b) 查看job情况(也可以在web上看)
oozie job -oozie http://uat-datacenter2:11000/oozie/ -info 0000006-210422181525733-oozie-oozi-W

7、web界面 http://localhost:11000/oozie

Oozie初探

FQA:

1、权限问题

Oozie初探

解决办法: 用户免密问题