1, 在编译后的tez 下找到 tez-ui-0.9.2.war. 用于部署前端ui使用
准备 tomcat .将war 解压到tmocat 下的webapps/tez下
//在webapps下新建tez目录
$ /usr/tomcat/default/webapps/tez
//将tez-ui解压到该目录下
$ unzip tez-ui-0.9.2.war
//修改配置文件,找到timeline server 和resource server
2,修改 yarn-site.xml,启用 timeline server
<!-- 向client标示Timeline Services是否是启用状态。如果启用,application使用的TimelineClient library会发送entitiy和event到Timeline server。默认为false-->
<property>
<name>yarn.timeline-service.enabled</name>
<value>true</value>
</property>
<!--该设置控制RM是否发布YARN系统度量值到timeline server。默认为false。-->
<property>
<name> yarn.resourcemanager.system-metrics-publisher.enabled</name>
<value>true</value>
</property>
<!-- 标示client是否通过timeline history-service查询通用的application数据。如果未启用,则application数据只能从Resource Manager查询。默认为false。-->
<property>
<name>yarn.timeline-service.generic-application-history.enabled</name>
<value>true</value>
</property>
<property>
<name>yarn.timeline-service.hostname</name>
<value>localhost</value>
</property>
<property>
<name>yarn.timeline-service.http-cross-origin.enabled</name>
<value>true</value>
</property>
<property>
<description>Address for the Timeline server to start the RPC server.</description>
<name>yarn.timeline-service.address</name>
<value>localhost:10201</value>
</property>
<property>
<description>The http address of the Timeline service web application.</description>
<name>yarn.timeline-service.webapp.address</name>
<value>localhost:8188</value>
</property>
<property>
<description>The https address of the Timeline service web application.</description>
<name>yarn.timeline-service.webapp.https.address</name>
<value>localhost:2191</value>
</property>
<property>
<name>yarn.timeline-service.handler-thread-count</name>
<value>24</value>
</property>
3,修改hive-site.xml.增加钩子函数,在tez ui中显示hive 信息.否则 hive queries tab页为空.
//添加以下三个钩子函数
<property>
<name>hive.exec.failure.hooks</name>
<value>org.apache.hadoop.hive.ql.hooks.ATSHook</value>
</property>
<property>
<name>hive.exec.post.hooks</name>
<value>org.apache.hadoop.hive.ql.hooks.ATSHook</value>
</property>
<property>
<name>hive.exec.pre.hooks</name>
<value>org.apache.hadoop.hive.ql.hooks.ATSHook</value>
</property>
4,修改$HADOOP_HOME/etc/hadoop/tez-site.xml .增加
<property>
<name>tez.history.logging.service.class</name>
<value>org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService</value>
</property>
<property>
<name>tez.tez-ui.history-url.base</name>
<value>http://localhost:8880/tez/</value>
</property>
访问 tomcat 的端口 http://localhost:8080/tez
知识点:
1, yarn 本身的命令中有一个 historyserver. 为什么还需要启用timelineserver 呢?
这是因为historyserver 是mapreduce的服务.就像 spark 有 history服务一样.而不是yarn本身的服务.有些概念的混淆.
2,timelineserver 未来规划会统一所有基于yarn开发的历史查询.
下面这个图很好的说明这点.
参考: https://blog.csdn.net/sinat_37690778/article/details/80594571