To install Apache Tez 0.10.4 with Hive 4.0.1 and Hadoop 3.4.1, here's the complete process:
Installation Location
Install Tez in your Hadoop ecosystem directory structure, typically:
/opt/tez or /usr/local/tez (standalone installation)
- Or alongside Hadoop in
/opt/hadoop/share/tez (integrated approach)
Installation Steps
1. Download and Extract Tez
cd /opt
wget https://archive.apache.org/dist/tez/0.10.4/apache-tez-0.10.4-bin.tar.gz
tar -xzf apache-tez-0.10.4-bin.tar.gz
mv apache-tez-0.10.4-bin tez
chown -R hadoop:hadoop tez # Adjust user/group as needed
2. Set Environment Variables
Add to your ~/.bashrc or system profile:
export TEZ_HOME=/opt/tez
export TEZ_CONF_DIR=$TEZ_HOME/conf
export PATH=$PATH:$TEZ_HOME/bin
3. Create Tez Configuration
Create $TEZ_CONF_DIR/tez-site.xml:
<configuration>
<property>
<name>tez.lib.uris</name>
<value>${fs.defaultFS}/apps/tez/tez.tar.gz</value>
</property>
<property>
<name>tez.use.cluster.hadoop-libs</name>
<value>true</value>
</property>
</configuration>
4. Upload Tez to HDFS
# Create directory in HDFS
hdfs dfs -mkdir -p /apps/tez
# Create tez.tar.gz with required libraries
cd $TEZ_HOME
tar -czf tez.tar.gz -C share/tez/tez .
# Upload to HDFS
hdfs dfs -put tez.tar.gz /apps/tez/
5. Configure Hive to Use Tez
Add to $HIVE_HOME/conf/hive-site.xml:
<property>
<name>hive.execution.engine</name>
<value>tez</value>
</property>
<property>
<name>hive.tez.container.size</name>
<value>1024</value>
</property>
6. Update Hive Classpath
Add to $HIVE_HOME/conf/hive-env.sh:
export HIVE_AUX_JARS_PATH=$TEZ_HOME/share/tez/tez/*:$TEZ_HOME/share/tez/tez/lib/*
7. Verify Installation
# Start Hive and check execution engine
hive
hive> set hive.execution.engine;
Additional Configuration Tips
Ensure your Hadoop cluster has sufficient memory allocated for Tez containers, and consider tuning parameters like tez.am.resource.memory.mb and tez.task.resource.memory.mb based on your cluster resources.
The Tez UI can be accessed through the Hadoop ResourceManager web interface once jobs are running.