———————————————————— 调配 Hadoop  ————————————————————

1 将 编译好的 TEZ .tar.gz 文件上传到 HDFS 中。
 
hdfs fs -put complete-tez-0.7.0.tar.gz /tez
 

2 创建 tez-site.xml

需要在 hadoop 的 master 节点上面的 ${HADOOP_HOME}/etc/hadoop 目录下面创建一个 tez-site.xml 文件,里面填写如下内容

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>tez.lib.uris</name>
<value>/tez/tez-0.7.0</value>
<name>tez.lib.uris</name>
<value>hdfs://t1:9000/tez/tez-0.8.2.tar.gz</value>
</property>
</configuration>
 
3 修改 hadoop-2.6.0/etc/hadoop/hadoop-env.sh 
 
export TEZ_HOME=/usr/local/opt/tez-0.7.0
          for jar in `ls $TEZ_HOME |grep jar`; do
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$TEZ_HOME/$jar
 done
           for jar in `ls $TEZ_HOME/lib`; do
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$TEZ_HOME/lib/$jar
 done
 
 

以上完成了tez的基本配置,接下来有 2 中方法使我们的任务运行在tez上,一种修改

 mapreduce-site.xml 设置 yarn  改为 yarn-tez

第二种,修改 hive 直接运行在 tez 上

 

第三种  hive set tez

 
———————————————————— hive on tez (单个 job 运行 Tez) ————————————————————
1 将编译好的 tez(编译成功的包会放在tez-dist/target )所有jar 包放入 hive下。
     find . -name "*jar" -print | cp -a `xargs` tezlib/ 
上面命令得到 tez 所有jar 包。
2  hive on tez 的使用方式 配置好以后 进入 hive
  1. hive (default)>set hive.execution.engine=tez;
  2. set hive.execution.engine=mr 或 退出 hive 即可
   3 如果 hive set tez 后运行异常可以启用调试模式启动hive (linux 下进入 hive 启动模式)
 
              hive -hiveconf hive.root.logger=DEBUG,console 
—————————————————— Hive on tez 性能测试——————————————————
性能测试:
select a.sex ,b.age , c.* from a join b on a.sex = b.sex join c on a.id ;
 
3表 各1万 / 169kb  
Hive on MapReduce
39分钟 = =!
 

hive on tez
25分钟  (未发挥最佳性能,因为数据量大量的 IO 都是拉取。并无多 MR)
set hive.execution.engine=tez;

实验 a 164M b 164M c 1.7G d 164M, e 164M
————————————————   hive on MR 3 分 9 秒  ————————————————

————————————————  hive on tez 22.5 秒  ————————————————

———————————————————— hive on tez (所有 job 运行 Tez) ————————————————————

Tez部署完毕后,下载hive0.14.0的二进制文件,解压即可。然后在hive的conf目录下新建hive-site.xml进行常规的配置,如果要是此hive运行在tez上,可以在配置文件中加上:

<property>

<name>mapreduce.framework.name</name>

<value>yarn-tez</value>

</property>

当然这个配置也能加在mapsite.xml里,建议加在需要hive-site.xml以不影响集群其他hive。

然后打开命令行,首先执行set hive.execution.engine=tez; 这里说下这个配置的含义,

Setting execution engine to mr and framework name to yarn = Hive compiles to MR and runs on MR.

Setting execution engine to mr and framework name to yarn-tez = Hive compiles to MR and runs on Tez.

Setting execution engine to tez = Hive compiles to Tez and runs on Tez.

 

Apache Tez on hive的更多相关文章

  1. Apache Tez 了解

    你可能听说过Apache Tez,它是一个针对Hadoop数据处理应用程序的新分布式执行框架.但是它到底是什么呢?它的工作原理是什么?哪些人应该使用它,为什么?如果你有这些疑问,那么可以看一下Bika ...

  2. Apache Tez Design

    http://tez.incubator.apache.org/ http://dongxicheng.org/mapreduce-nextgen/apache-tez/ http://dongxic ...

  3. Apache Hudi 与 Hive 集成手册

    1. Hudi表对应的Hive外部表介绍 Hudi源表对应一份HDFS数据,可以通过Spark,Flink 组件或者Hudi客户端将Hudi表的数据映射为Hive外部表,基于该外部表, Hive可以方 ...

  4. CentOS 6.5 Maven 编译 Apache Tez 0.8.3 踩坑/报错解决记录

    最近准备学习使用Tez,因此从官网下载了最新的Tez 0.8.3源码,按照安装教程编译使用.平时使用的集群环境是离线的,本打算这一次也进行离线编译,无奈一编译就开始报缺少jar包的错,即使手动下载ja ...

  5. Caused by: java.sql.SQLException: Failed to start database 'metastore_db' with class loader org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1@d7c365, see the next exception for details.

    解决方法:https://stackoverflow.com/questions/37442910/spark-shell-startup-errors 异常: 18/01/29 19:04:27 W ...

  6. Apache ranger整合hive报错记录

    版本信息如下: hadoop2.9.2 hive 2.x ranger 最新版2.1.0 在hive端部署完ranger 插件以后,在使用beeline连接查询数据库时报错,报错信息如下: verbo ...

  7. local模式运行spark-shell时报错 java.lang.IllegalArgumentException: Error while instantiating 'org.apache.spark.sql.hive.HiveSessionState':

    先前在local模式下,什么都不做修改直接运行./spark-shell 运行什么问题都没有,然后配置过在HADOOP yarn上运行,之后再在local模式下运行出现以下错误: java.lang. ...

  8. Apache Tez 0.7、0.83、 0.82 安装、调试笔记

    ———————————————————— 准备 Tez 编译环境 ———————————————————— 1 需要的支持 tez0.7 需要 Hadoop 2.60 以上 2 需要的 linux 相 ...

  9. apache开源项目--HIVE

    Hive是一个基于Hadoop的数据仓库平台.通过hive,我们可以方便地进行ETL的工作.hive定义了一个类似于SQL的查询语言:HQL,能 够将用户编写的QL转化为相应的Mapreduce程序基 ...

随机推荐

  1. CF49A Sleuth

    CF49A Sleuth 题目描述 Vasya plays the sleuth with his friends. The rules of the game are as follows: tho ...

  2. No unique bean of type [net.shougongfang.action.paymoney.AlipayPayMoneyReturnObj] is defined: Unsat

    0 你把@Service放到实现类上吧.这个问题好像不止一个人在问啦 2013年10月25日 10:34 shidan66  30  0 1 1 加入评论 00 1,@service放到实现上  2. ...

  3. bzoj5288: [Hnoi2018]游戏

    我还是太年轻了... 考场上就是直接枚举预处理当前位置左右延伸到的最远距离,好像是水了20.. 然后噶爷爷居然随机一下就AC了????mengbier #include<cstdio> # ...

  4. page template in kentico

    Ad-hoc templates are used for one page only, for which they were created - this is why they are not ...

  5. iOS 判断是否有权限访问相机,相册

    1.判断用户是否有权限访问相册 #import <AssetsLibrary/AssetsLibrary.h> ALAuthorizationStatus author =[ALAsset ...

  6. ES 處於“initializing”狀態,此時主節點正在嘗試將分片分配到集群中的數據節點。 如果您看到分片仍處於初始化或未分配狀態太長時間,則可能是您的集群不穩定的警告信號。

    指標要點: Cluster status: 如果集群狀態為黃色,則至少有一個副本分片未分配或丟失. 搜索結果仍將完成,但如果更多的分片消失,您可能會丟失數據. 紅色的群集狀態表示至少有一個主分片丟失, ...

  7. HIT Software Construction Lab 5_经验总结

    前言: 终于写完lab5了,这次lab5是基于lab3的一次实验,主要是王忠杰老师提供了4个大约有50w行的大文件让我们根据自己所选应用读取其中两个并且创建轨道系统. 这次lab5优化的我很崩溃,因为 ...

  8. HD-ACM算法专攻系列(14)——find your present (2)

    问题描述: 源码: #include"iostream" #include"algorithm" using namespace std; bool cmp(i ...

  9. Bluefish Editor - 蓝鱼编辑器 for Web Designer

    Bluefish is a GTK+ HTML editor for the experienced web designer. Its features include nice wizards f ...

  10. Vue模拟酷狗APP问题总结

    一.NewSongs.vue中的38行  this.$http.get('/proxy/?json=true')   里面这个路径的获取 二.router文件夹中的index.js  中的  comp ...