因Ambari2.6移除了Tez的ui管理界面,在Debug tez的任务比较麻烦所以研究了下怎么安装
附官方公告ambari2.6升级2.7时去掉了tez-ui
https://docs.cloudera.com/HDPDocuments/Ambari-2.7.0.0/bk_ambari-upgrade/content/bhvr_changes_upgrade_hdp3_amb27.html
- 1.下载tomcat
wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.5.47/bin/apache-tomcat-8.5.47.tar.gz
解压
Chmod 777修改权限后运行startup.sh启动tomcat
如需修改端口按上图路径修改tomcat端口
运行成功
- 2.下载tez-ui.war包
https://repository.apache.org/content/repositories/releases/org/apache/tez/tez-ui/
选择合适版本下载
本文采用最新的版本安装
wget https://repository.apache.org/content/repositories/releases/org/apache/tez/tez-ui/0.9.2/tez-ui-0.9.2.war
随后将下载的war放入tomcat的webapps中,
unzip 解压
进入配置文件修改配置
将图上两个地址端口修改为自己的
两个地址可在ambari中查看
以上为timeline主机的host
以上为rm端口及host
3.修改tez-site.xml,yarn-site.xml配置文件
tez-site.xml
-------------
...
<property>
<description>Enable Tez to use the Timeline Server for History Logging</description>
<name>tez.history.logging.service.class</name>
<value>org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService</value>
</property>
<property>
<description>URL for where the Tez UI is hosted</description>
<name>tez.tez-ui.history-url.base</name>
<value>http://<webserver-host:9999/tez-ui/</value>
</property>
...
Add Property 添加两项即可
yarn-site.xml添加/修改
yarn-site.xml
-------------
...
<property>
<description>Indicate to clients whether Timeline service is enabled or not.
If enabled, the TimelineClient library used by end-users will post entities
and events to the Timeline server.</description>
<name>yarn.timeline-service.enabled</name>
<value>true</value>
</property>
<property>
<description>The hostname of the Timeline service web application.</description>
<name>yarn.timeline-service.hostname</name>
<value>localhost</value>
</property>
<property>
<description>Enables cross-origin support (CORS) for web services where
cross-origin web response headers are needed. For example, javascript making
a web services request to the timeline server.</description>
<name>yarn.timeline-service.http-cross-origin.enabled</name>
<value>true</value>
</property>
<property>
<description>Publish YARN information to Timeline Server</description>
<name> yarn.resourcemanager.system-metrics-publisher.enabled</name>
<value>true</value>
</property>
...
保存后重启tomcat即可正常运行tez-ui
http://master:8822/tez-ui/
以上完成安装,再次提交tez任务会在界面中显示,若运行tez不显示或报错,检查timeline,rm是否配置正确
附官方文档
https://tez.apache.org/tez-ui.html