2-10 就业课(2.0)-oozie:9、oozie与hue的整合,以及整合后执行MR任务

5、hue整合oozie

第一步:停止oozie与hue的进程

通过命令停止oozie与hue的进程,准备修改oozie与hue的配置文件

第二步:修改oozie的配置文件(老版本的bug,新版本已经不需要了)这一步我们都不需要做了

修改oozie的配置文件oozie-site.xml

<property>    <name>oozie.service.WorkflowAppService.system.libpath</name>

        <value>/user/oozie/share/lib</value>

    </property>

     <property>

        <name>oozie.use.system.libpath</name>

        <value>true</value>

    </property>

 

重新上传所有的jar包到hdfs的/user/oozie/share/lib路径下去

cd /export/servers/oozie-4.1.0-cdh5.14.0

bin/oozie-setup.sh  sharelib create -fs hdfs://node01:8020 -locallib oozie-sharelib-4.1.0-cdh5.14.0-yarn.tar.gz

 

 

 

 

第三步:修改hue的配置文件

修改hue的配置文件hue.ini

 

[liboozie]

  # The URL where the Oozie service runs on. This is required in order for

  # users to submit jobs. Empty value disables the config check.

  oozie_url=http://node03.hadoop.com:11000/oozie

 

  # Requires FQDN in oozie_url if enabled

  ## security_enabled=false

 

  # Location on HDFS where the workflows/coordinator are deployed when submitted.

  remote_deployement_dir=/user/root/oozie_works

 

修改oozie的配置文件大概在1151行左右的样子

[oozie]

  # Location on local FS where the examples are stored.

  # local_data_dir=/export/servers/oozie-4.1.0-cdh5.14.0/examples/apps

 

  # Location on local FS where the data for the examples is stored.

  # sample_data_dir=/export/servers/oozie-4.1.0-cdh5.14.0/examples/input-data

 

  # Location on HDFS where the oozie examples and workflows are stored.

  # Parameters are $TIME and $USER, e.g. /user/$USER/hue/workspaces/workflow-$TIME

  # remote_data_dir=/user/root/oozie_works/examples/apps

 

  # Maximum of Oozie workflows or coodinators to retrieve in one API call.

  oozie_jobs_count=100

 

  # Use Cron format for defining the frequency of a Coordinator instead of the old frequency number/unit.

  enable_cron_scheduling=true

 

  # Flag to enable the saved Editor queries to be dragged and dropped into a workflow.

  enable_document_action=true

 

  # Flag to enable Oozie backend filtering instead of doing it at the page level in Javascript. Requires Oozie 4.3+.

  enable_oozie_backend_filtering=true

 

  # Flag to enable the Impala action.

  enable_impala_action=true

 

[filebrowser]

  # Location on local filesystem where the uploaded archives are temporary stored.

  archive_upload_tempdir=/tmp

 

  # Show Download Button for HDFS file browser.

  show_download_button=true

 

  # Show Upload Button for HDFS file browser.

  show_upload_button=true

 

  # Flag to enable the extraction of a uploaded archive in HDFS.

  enable_extract_uploaded_archive=true

 

 

 

第四步:启动hue与oozie的进程

启动hue进程

cd /export/servers/hue-3.9.0-cdh5.14.0

build/env/bin/supervisor

启动oozie进程

cd /export/servers/oozie-4.1.0-cdh5.14.0

bin/oozied.sh start

 

页面访问hue

http://node03.hadoop.com:8888/

 

 

6、oozie使用过程当中可能遇到的问题

1) Mysql权限配置

授权所有主机可以使用root用户操作所有数据库和数据表

mysql> grant all on *.* to root@'%' identified by '123456' with grant option;

mysql> flush privileges;

mysql> exit;

2) workflow.xml配置的时候不要忽略file属性

3) jps查看进程时,注意有没有bootstrap

4) 关闭oozie

如果bin/oozied.sh stop无法关闭,则可以使用kill -9 [pid],之后oozie根目录下的oozie-server/temp/xxx.pid文件一定要删除。

5) Oozie重新打包时,一定要注意先关闭进程,删除对应文件夹下面的pid文件。(可以参考第4条目)

6) 配置文件一定要生效

起始标签和结束标签无对应则不生效,配置文件的属性写错了,那么则执行默认的属性。

7) libext下边的jar存放于某个文件夹中,导致share/lib创建不成功。

9) 修改Hadoop配置文件,需要重启集群。一定要记得scp到其他节点。

10) JobHistoryServer必须开启,集群要重启的。

11) Mysql配置如果没有生效的话,默认使用derby数据库。

12) 在本地修改完成的job配置,必须重新上传到HDFS

13) 将HDFS中上传的oozie配置文件下载下来查看是否有错误。

14) Linux用户名和Hadoop的用户名不一致。

15)sharelib找不到,包括重新初始化oozie

如果部署oozie出错,修复执行,初始化oozie

1、停止oozie(要通过jps检查bootstrap进程是否已经不存在)

2、删除oozie-server/temp/*

3、删除HDFS上的sharelib文件夹

4、删除oozie.sql文件,删除Mysql中删除oozie库,重新创建

5、重新按照顺序执行文档中oozie的安装重新再来一遍

转载于:https://www.cnblogs.com/mediocreWorld/p/11173683.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值