一、
1.下载apache-tez-0.5.4-src.tar.gz
2.下载apache-maven-3.2.5-bin.tar
3.下载protobuf-2.5.0.tar.gz
二、安装
1.安装mvn,省略
2.安装protobuf:
a. tar -zxf protobuf-2.5.0.tar.gz命令解压后得到是protobuf-2.5.0的源码,
b. cd protobuf-2.5.0
c. 执行 ./configure --prefix=/home/master/protobuf/
d. 执行 make && make install
e. 在/etc/profile添加 export PATH=/home/master/protobuf/bin
d. 最后输入 protoc --version命令,如显示libprotoc 2.5.0则安装成功
三、编译tezmvn clean package -DskipTests=true -Dmaven.javadoc.skip=true
四、与hive集成
1. hadoop fs -mkdir /apps/tez-0.5.4
2.添加/etc/profile文件:
export TEZ_HOME=/home/master/tez-0.4.1/tez-dist/target/tez-0.4.1-incubating-full/tez-0.4.1-incubating-full
export TEZ_CONF_DIR=$TEZ_HOME/conf
export TEZ_JARs=$TEZ_HOME
export HADOOP_CLASSPATH=${TEZ_CONF_DIR}:${TEZ_JARS}/*:${TEZ_JARS}/lib/*
3.在/home/master/tez-0.4.1/tez-dist/target/tez-0.4.1-incubating-full/tez-0.4.1-incubating-full/conf
vim 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>${fs.defaultFS}/apps/tez-0.4.1,${fs.defaultFS}/apps/tez-0.4.1/lib/</value>
</property>
</configuration>
4.
将tez下的jar和tez下的lib下的jar包复制到hive的$HIVE_HOME/lib目录下即可
配置过程中,我的hive和hadoop的master在同一个节点上,以hadoop用户启动运行hive,tez/mr一切顺利,
hive (default)>set hive.execution.engine=tez;