1.下载包
wget http://qiniu.asdu.cn/apache-tez-0.9.0-bin.tar.gz
2.解压到安装目录
# 这里以/opt作为安装目录
tar -xvf apache-tez-0.9.0-bin.tar.gz -C /opt
ln -s /opt/apache-tez-0.9.0-bin /opt/tez
3.hive配置
因为yarn也需要tez的依赖包,hive启动时会读取HADOOP_CLASS变量,所以要在hadoop-env.sh中配置
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/etc/tez/conf:/opt/tez/*:/opt/tez/lib/*
重启hive
4. tez 配置
tez-site.xml配置,需要将包上传到hdfs,可以利用yarn nodemanager的缓存策略,降低yarn启动任务应为下载资源的等待时间
<property>
<name>tez.lib.uris</name>
<value>hdfs://${fs.defaultFS}/tez/</value>
</property>
<!-- tez可使用集群的jar包 -->
<property>
<name>tez.use.cluster.hadoop-libs</name>
<value>true</value>
</property>
5. yarn 配置
yarn-site.xml
yarn.nodemanager.aux-services 新增tez_shuffle属性
yarn.nodemanager.aux-services.tez_shuffle.class org.apache.tez.auxservices.ShuffleHandler
重启nodemanager
网友评论