Ambari2.7+HDP3启用TEZ-UI

背景

Ambari 2.7之后,TezUI默认不随集群一起部署了,当Tez任务有异常时想定位sql非常麻烦,每次部署的时候解决了问题,过段时间又忘了,手动记录一下吧。

部署tomcat

去清华镜像里找到最新的tomcat包https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/下载下来,上传到服务器上解压即可

wget https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.88/bin/apache-tomcat-8.5.88.tar.gz
tar -xf apache-tomcat-8.5.88.tar.gz

部署Tez-ui的war包

官网下载tez-ui的最新war包https://repository.apache.org/content/repositories/releases/org/apache/tez/tez-ui/
解压后放到tomcat的webapp目录下

cd apache-tomcat-8.5.88/webapps
mkdir tez-ui && cd tez-ui
wget https://repository.apache.org/content/repositories/releases/org/apache/tez/tez-ui/0.10.2/tez-ui-0.10.2.war
unzip tez-ui-0.10.2.war

修改配置

修改tomcat端口

cd apache-tomcat-8.5.88/conf
vim server.xml
	    <Connector port="9999" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               maxParameterCount="1000"
               />

修改tez-ui配置,timeline填timeline server的host或ip
rm填resource mananger的host或ip,
建议都写成带统一后缀的域名如xxx.local,后面可以避免跨域问题,否则需要打开yarn的跨域配置

vim webapps/tez-ui/config/configs.js
	timeline: "http://xxx.xxx.xxx.xxx:8188",
	rm: "http://xxx.xxx.xxx.xxx:8088",

在Ambari页面修改tez和yarn的配置
tez: Custom tez-site

tez.tez-ui.history-url.base=http://<tomcat-host:9999/tez-ui/
tez.history.logging.service.class=org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService

yarn:

yarn.timeline-service.enabled=true(一般已经打开了,不用改)
yarn.timeline-service.hostname=timelineServer Host((一般已设置好,不用改))
yarn.timeline-service.http-cross-origin.enabled=true(如果浏览器访问的地址和configs.js填的不一样,需要设置为true,一般默认为true)

启动tomcat

cd apache-tomcat-8.5.88/
sh bin/startup.sh

到这步已经可以访问到tez-ui的页面了,但是往往此时只有页面没有数据,F12查看接口返回都是{entities: [ ]},往往是yarn的ACL问题

关闭yarn的acl

Ambari 里修改yarn配置
yarn:

yarn.acl.enable = false
或者新增dr.who
yarn.admin.acl = xxx,dr.who

增加hive hook

到这一步All DAGs 这个banner应该有内容了,但是Hive Queries里还是空
Ambari里修改hive配置

hive_timeline_logging_enabled = true
hive.exec.pre.hooks = org.apache.hadoop.hive.ql.hooks.ATSHook
hive.exec.post.hooks = org.apache.hadoop.hive.ql.hooks.ATSHook,org.apache.atlas.hive.hook.HiveHook
hive.exec.failure.hooks = org.apache.hadoop.hive.ql.hooks.ATSHook

到这里就算是配置完了,在ambari里重启hive、yarn、tez有关组件即可

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值