Tez 설치

Chan hae OH·2023년 6월 7일
0

Hive 설치

목록 보기
3/3

CentOS 7 기준

TEZ 0.10.2 버전은 hadoop 2.7.0 이상 이여야 한다.



1. Tez 다운


cd /opt

wget https://downloads.apache.org/tez/0.10.2/apache-tez-0.10.2-bin.tar.gz --no-check-certificate



2. 압축 해제


tar -zxvf apache-tez-0.10.2-bin.tar.gz
ln -s /opt/apache-tez-0.10.2-bin /usr/local/tez



3. lib 교체


cp /usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-client-3.3.4.jar /usr/local/tez/lib
cp /usr/local/hadoop/share/hadoop/hdfs/hadoop-mapreduce-client-common-3.3.4.jar /usr/local/tez/lib
cp /usr/local/hadoopshare/hadoop/hdfs/hadoop-mapreduce-client-core-3.3.4.jar /usr/local/tez/lib
cp /usr/local/hadoop/share/hadoop/hdfs/hadoop-yarn-server-timeline-pluginstorage-3.3.4.jar /usr/local/tez/lib

rm -rf /usr/local/tez/lib/hadoop-hdfs-client-3.3.1.jar
rm -rf /usr/local/tez/lib/hadoop-mapreduce-client-common-3.3.1.jar
rm -rf /usr/local/tez/lib/hadoop-mapreduce-client-core-3.3.1.jar
rm -rf /usr/local/tez/lib/hadoop-yarn-server-timeline-pluginstorage-3.3.1.jar



4. tez-site.xml


vi /usr/local/tez/conf/tez-site.xml
<?xml version="1.0"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- WARNING: THIS IS A GENERATED TEMPLATE PURELY FOR DOCUMENTATION PURPOSES
 AND SHOULD NOT BE USED AS A CONFIGURATION FILE FOR TEZ -->

<configuration>
        <property>
                <name>tez.lib.uris</name>
                <value>${fs.defaultFS}/user/tez/tez.tar.gz</value>
        </property>
        <property>
                <name>tez.use.cluster.hadoop-libs</name>
                <value>true</value>
        </property>
        <property>
                <name>hive.tez.container.size</name>
                <value>3020</value>
        </property>
</configuration>



5. 환경변수 설정


vi /etc/profile

export TEZ_HOME=/usr/local/tez
export TEZ_CONF_DIR=$TEZ_HOME/conf
export TEZ_JARS=$TEZ_HOME/*:$TEZ_HOME/lib/*

export HADOOP_CLASSPATH=$CLASSPATH:${TEZ_CONF_DIR}:${TEZ_JARS}/*:${TEZ_JARS}/lib/*

source /etc/profile



6. hdfs tez.tar.gz 업로드

hdfs dfs -mkdir -p /tez
hdfs dfs -put /usr/local/tez/share/tez.tar.gz /tez



7. hive engine 교체


hive
set hive.execution.engine=tez;
profile
Data Engineer

0개의 댓글