Hadoop 2.7.7
Hive 2.3.7
Tez 0.9.2
保证hadoop集群启动,hive元数据服务启动
tar -zxvf apache-tez-0.9.2-bin.tar.gz
mv apache-tez-0.9.2-bin tez-0.9.2
hdfs dfs -mkidr /tez
hdfs dfs -put tez-0.9.2 /tez
#这里tez可以直接上文件,也可以上传解压后的文件
export TEZ_HOME=/opt/tez-0.9.2 #tez解压目录
export TEZ_JARS=""
for jar in `ls $TEZ_HOME |grep jar`; do
export TEZ_JARS=$TEZ_JARS:$TEZ_HOME/$jar
done
for jar in `ls $TEZ_HOME/lib`; do
export TEZ_JARS=$TEZ_JARS:$TEZ_HOME/lib/$jar
done
#export HIVE_AUX_JARS_PATH=
#配置外部Jar包,如LZO等
</property>
<property>
<name>hive.execution.engine</name>
<value>tez</value>
</property>
<?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}/tez/tez-0.9.2,${fs.defaultFS}/tez/tez-0.9.2/lib</value>
<!-- 指定依赖位置 -->
</property>
<property>
<name>tez.lib.uris.classpath</name>
<value>${fs.defaultFS}/tez/tez-0.9.2,${fs.defaultFS}/tez/tez-0.9.2/lib</value>
<!-- 实测这项配置非必须 -->
</property>
<property>
<name>tez.use.cluster.hadoop-libs</name>
<value>true</value>
</property>
<property>
<name>tez.history.logging.service.class</name>
<value>org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService</value>
</property>
</configuration>
java.lang.NoClassDefFoundError: org/apache/tez/dag/api/SessionNotRunning
显示会话服务无法开启
或者使用这套思路应该也可以解决 Exception in thread main java.lang.NoClassDefFoundError: org/apache/tez/dag/api/TezConfiguration
org.apache.tez.dag.api.TezUncheckedException: Invalid configuration of tez jars, tez.lib.uris is not defined in the configuration
手机扫一扫
移动阅读更方便
你可能感兴趣的文章