博客
关于我
Tez 0.9安装部署+hive on tez配置 + Tez-UI
阅读量:325 次
发布时间:2019-03-04

本文共 3308 字,大约阅读时间需要 11 分钟。

Tez 说明

请将 xyz 替换为您正在使用的 Tez 发行版号。例如 0.5.0。对于 Tez 版本 0.8.3 和更高版本,Tez 需要 Apache Hadoop 版本为 2.6.0 或更高版本。对于 Tez 版本 0.9.0 及更高版本,Tez 需要 Apache Hadoop 版本为 2.7.0 或更高版本。


关于版本

  • Hadoop 2.7.0+(我的是 2.7.1)
  • Tez 还需要 Protocol Buffers 2.5.0,包括 protoc 编译器。如果您下载的是 apache-tez-0.9.0-src.tar.gz 包则需要编译,需要 Protocol Buffers 2.5.0
  • Maven 3+
  • Hive 2.1.1
  • tez-0.9.0

  • protobuf-2.5.0 安装

    (注:如果下载的是 apache-tez-0.9.0-bin.tar.gz 则不需要编译。可以跳过这一步,建议下载 bin)

  • 解压
  • 编译安装
    cd protobuf-2.5.0./configuremakemake installprotoc --version(验证是否安装成功)

  • 安装部署 Tez

  • 可以选择下载:

    • apache-tez-0.9.0-src.tar.gz(建议下载这个,感觉 src 编译遇到好多问题)
    • apache-tez-0.9.0-bin.tar.gz(建议下载这个,感觉 src 编译遇到好多问题)
  • 编译方式一:

    tar -zxvf apache-tez-0.9.0-src.tar.gzchmod -R 777 apache-tez-0.9.0-srccd apache-tez-0.9.0-srcmvn clean package -DskipTests=true -Dmaven.javadoc.skip=true
  • 将 Tez 的压缩包放到 HDFS 上去:

    • 方式一:所在文件目录为 apache-tez-0.9.0-src/target
    • 方式二:所在文件目录为 apache-tez-0.9.0-bin/share
    hadoop fs -mkdir -p /user/tezhadoop fs -put tez.tar.gz /user/tez
  • 在 Hadoop/etc/hadoop 下创建 tez-site.xml 文件并写上如下配置:

    vi tez-site.xml
    tez.lib.uris
    ${fs.defaultFS}/user/tez/tez.tar.gz
    tez.container.max.java.heap.fraction
    0.2

    保存后将文件复制到其他节点。

  • 修改 hadoop-env.sh 并追加以下几行:

    TEZ_CONF_DIR=/usr/local/hadoop/etc/hadoop/tez-site.xmlTEZ_JARS=/usr/local/tez/apache-tez-0.9.0-binexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:${TEZ_CONF_DIR}:${TEZ_JARS}/*:${TEZ_JARS}/lib/*
  • 重启 Hadoop:

    hadoop-daemon.sh stophadoop-daemon.sh start
  • 启动 Hive:

    set hive.execution.engine=tez

  • 设置 Tez-UI

  • 找到 WAR 包

    • 因为我安装的是 bin,所以在安装包中就有 tez-ui-0.9.0.war
    • 自己编译的话也有生成,这里不做过多赘述。
  • 将 Tez-UI 部署到 Tomcat:

    mkdir /usr/local/apache/apache-tomcat-8.5.31/webapps/tez-uicd /usr/local/apache/apache-tomcat-8.5.31/webapps/tez-uiunzip tez-ui-0.9.0.warvim config/configs.env
  • 配置 TimelineServer:

    • 目录:/usr/local/hadoop/etc/hadoop
    • 添加以下内容到 yarn-site.xml 并分发到各个节点:
    vi yarn-site.xml

    添加以下内容:

    yarn.timeline-service.enabled
    true
    yarn.timeline-service.hostname
    tmaster
    yarn.timeline-service.http-cross-origin.enabled
    true
    yarn.timeline-service.system-metrics-publisher.enabled
    true
    yarn.timeline-service.generic-application-history.enabled
    true
    yarn.timeline-service.address
    tmaster:10201
    yarn.timeline-service.webapp.address
    tmaster:8188
    yarn.timeline-service.webapp.https.address
    tmaster:2191
    yarn.timeline-service.handler-thread-count
    24
  • 添加 Tez 的配置到 tez-site.xml,并分发到各个节点:

    vi tez-site.xml

    添加以下内容:

    tez.history.logging.service.class
    org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService
    tez.tez-ui.history-url.base
    http://192.168.205.70:8880/tez-ui/
  • 启动 Hadoop:

    hadoop-daemon.sh stophadoop-daemon.sh start
  • 启动 TimelineServer:

    yarn-daemon.sh start timelineserver
  • 启动 Tomcat:

    /usr/local/apache/apache-tomcat-8.5.31/bin/startup.sh
  • 访问界面:

    • 访问地址:http://tmaster:8080/tez-ui
  • 转载地址:http://bxgq.baihongyu.com/

    你可能感兴趣的文章
    MySQL8修改密码的方法
    查看>>
    Mysql8在Centos上安装后忘记root密码如何重新设置
    查看>>
    Mysql8在Windows上离线安装时忘记root密码
    查看>>
    MySQL8找不到my.ini配置文件以及报sql_mode=only_full_group_by解决方案
    查看>>
    mysql8的安装与卸载
    查看>>
    MySQL8,体验不一样的安装方式!
    查看>>
    MySQL: Host '127.0.0.1' is not allowed to connect to this MySQL server
    查看>>
    Mysql: 对换(替换)两条记录的同一个字段值
    查看>>
    mysql:Can‘t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock‘解决方法
    查看>>
    MYSQL:基础——3N范式的表结构设计
    查看>>
    MYSQL:基础——触发器
    查看>>
    Mysql:连接报错“closing inbound before receiving peer‘s close_notify”
    查看>>
    mysqlbinlog报错unknown variable ‘default-character-set=utf8mb4‘
    查看>>
    mysqldump 参数--lock-tables浅析
    查看>>
    mysqldump 导出中文乱码
    查看>>
    mysqldump 导出数据库中每张表的前n条
    查看>>
    mysqldump: Got error: 1044: Access denied for user ‘xx’@’xx’ to database ‘xx’ when using LOCK TABLES
    查看>>
    Mysqldump参数大全(参数来源于mysql5.5.19源码)
    查看>>
    mysqldump备份时忽略某些表
    查看>>
    mysqldump实现数据备份及灾难恢复
    查看>>