In our one old guide, we provided steps to install Apache Ambari. Apache Tez is an extensible YARN framework for building interactive data processing applications. Tez can also be used by other Hadoop components such as Apache Hive and Apache Pig to improve query performance. We Can Also Install Tez Using Ambari UI Instead of CLI. Here Are the Details on How To Install Apache Tez on One Node Hadoop, and Integrating Hive and Apache Tez. This is the official website of Tez :
1 | https://tez.apache.org/ |
Instructions for installing, configuring Apache Tez will be different for HDP 2.1 and on later versions of HDP 2.2.
How To Install Apache Tez (One Node Hadoop)
We can actually install from apt or yum repository :
---
1 2 3 4 5 6 7 8 9 | apt-get install tez su - $HDFS_USER hdfs dfs -mkdir -p /hdp/apps/<hdp_version>/tez/ hdfs dfs -put /usr/hdp/<hdp_version>/tez/lib/tez.tar.gz /hdp/apps/<hdp_version>/tez/ hdfs dfs -chown -R $HDFS_USER:$HADOOP_USER /hdp hdfs dfs -chmod -R 555 /hdp/apps/<hdp_version>/tez hdfs dfs -chmod -R 444 /hdp/apps/<hdp_version>/tez/tez.tar.gz su - $HDFS_USER hdfs dfs -ls /hdp/apps/<hdp_version>/tez |
OR, we can :
Download the apache tez binary tar ball from official website, extract the tar ball to local directory like /hdfsuser/tez
, create a directory on hdfs like /user/tez
, copy the extracted folder to the the created hdfs directory, create tez-site.xml
file from the tez-default-template.xml
. Refer to sample tez-site.xml
and
sample bashrc for version specific edits. In the tez-site.xml
file, configure the tez.lib.uris
property with the HDFS path containing the Tez tarball file :
1 2 3 4 5 | ... <property> <name>tez.lib.uris</name> <value>/hdp/apps/<hdp_version>/tez/tez.tar.gz</value> </property> |
Edit mapred-site.xml
like written in sample mapred-site.xml. We can test by :
1 | $hadoop jar $TEZ_HOME/<tez-examples.jar> orderedwordcount /path/to/sample/text/file /path/to/output/hdfs/directory |
How To Configure Apache Tez (One Node Hadoop)
Actually we written above in easy language. You can read the full official documentation :
1 | https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.2/bk_command-line-installation/content/ref-ffec9e6b-41f4-47de-b5cd-1403b4c4a7c8.1.html |
We were talking about Ambari view, you can read the official documentation if you need :
1 | https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.2.0/bk_ambari-views/content/section_create_tez_view_instance.html |
I actually followed the official guide and found not much difficulty. To enable Hive to use Tez as execution engine, copy hive-exec jar from $HIVE_HOME/lib
to hdfs://localhost:8020/user/tez/
. Use "set hive.execution.engine=tez;"
command on the Hive prompt. Alternatively edit hive-site.xml
and change the value of the property hive.execution.engine
from “mr” to “tez” to make tez as the default engine for hive.