首页 文章详情

cdh6.3.4集成tez0.9.2

大数据AI | 1107 2021-08-24 22:41 0 0 0
UniSMS (合一短信)

编译环境准备

安装JDK

[root@song ~]# tar -zxvf jdk-8u271-linux-x64.tar.gz 
[root@song ~]# mv jdk1.8.0_271/ /usr/local/java
[root@song ~]# vim /etc/profile
# set java env
export JAVA_HOME=/usr/local/java
export PATH=$JAVA_HOME/bin:$PATH
[root@song ~]# source /etc/profile
[root@song ~]# java -version
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)

安装maven

[root@song ~]# wget https://mirrors.advancedhosters.com/apache/maven/maven-3/3.8.1/binaries/apache-maven-3.8.1-bin.tar.gz
[root@song ~]# tar -zxvf apache-maven-3.8.1-bin.tar.gz
[root@song ~]# mv apache-maven-3.8.1 /usr/local/maven
[root@song ~]# vim /etc/profile
# set mvn env
export MVN_HOME=/usr/local/maven
export PATH=$MVN_HOME/bin:$PATH
[root@song ~]# source /etc/profile
[root@song ~]# mvn -v
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /usr/local/maven
Java version: 1.8.0_292, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-957.21.3.el7.x86_64", arch: "amd64", family: "unix"

安装protobuf-2.5.0

下载地址:https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz

注意:protobuf必须是2.5.0版本

[root@song ~]# wget https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
[root@song ~]# tar -zxvf protobuf-2.5.0.tar.gz 
[root@song ~]# cd protobuf-2.5.0
[root@song protobuf-2.5.0]# yum install -y gcc make gcc-c++ bzip2
[root@song protobuf-2.5.0]# ./configure 
[root@song protobuf-2.5.0]# make
[root@song protobuf-2.5.0]# make install
[root@song protobuf-2.5.0]# protoc --version
libprotoc 2.5.0

编译tez

下载地址:http://apache.claz.org/tez/0.9.2/apache-tez-0.9.2-src.tar.gz

下载tez源码

[song@song ~]# wget http://apache.claz.org/tez/0.9.2/apache-tez-0.9.2-src.tar.gz
[song@song ~]$ scp -r apache-tez-0.9.2-src apache-tez-0.9.2-src-6.3.4
[song@song ~]$ cd apache-tez-0.9.2-src-6.3.4/
[song@song apache-tez-0.9.2-src-6.3.4]$

修改pom.xml文件

  1. properties中修改hadoop版本为cdh版本

    <properties>
        <!--<hadoop.version>2.7.2</hadoop.version>-->
        <hadoop.version>3.0.0-cdh6.3.4</hadoop.version>
    </properties>
  2. repositories中添加cdh的maven库

    <repository>
      <id>cloudera</id>
      <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
      <name>Cloudera Repositories</name>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
     </repository>
    452206c3a14c15ec310cb43c9aa4d898.webp
  3. pluginRepositories中添加cdh库

    <pluginRepository>
      <id>cloudera</id>
      <name>Cloudera Repositories</name>
      <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
    </pluginRepository>
    c9619d00d5ca7ec2797704f696a4262e.webp
  4. 注释掉modules中下列模块

    0ee28db0bc18124b665b689223d11528.webp

编译tez

[song@song apache-tez-0.9.2-src-6.3.4]$ mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for tez 0.9.2:
[INFO] 
[INFO] tez ................................................ SUCCESS [  1.212 s]
[INFO] hadoop-shim ........................................ SUCCESS [  1.967 s]
[INFO] tez-api ............................................ SUCCESS [  6.461 s]
[INFO] tez-build-tools .................................... SUCCESS [  0.049 s]
[INFO] tez-common ......................................... SUCCESS [  0.583 s]
[INFO] tez-runtime-internals .............................. SUCCESS [  0.946 s]
[INFO] tez-runtime-library ................................ SUCCESS [  3.585 s]
[INFO] tez-mapreduce ...................................... SUCCESS [  1.391 s]
[INFO] tez-examples ....................................... SUCCESS [  0.344 s]
[INFO] tez-dag ............................................ SUCCESS [  5.896 s]
[INFO] tez-tests .......................................... SUCCESS [  1.058 s]
[INFO] tez-ui ............................................. SUCCESS [ 29.680 s]
[INFO] tez-plugins ........................................ SUCCESS [  0.025 s]
[INFO] tez-protobuf-history-plugin ........................ SUCCESS [  0.546 s]
[INFO] tez-yarn-timeline-history .......................... SUCCESS [  0.648 s]
[INFO] tez-yarn-timeline-history-with-acls ................ SUCCESS [  0.828 s]
[INFO] tez-history-parser ................................. SUCCESS [ 18.132 s]
[INFO] tez-aux-services ................................... SUCCESS [  5.375 s]
[INFO] tez-tools .......................................... SUCCESS [  0.027 s]
[INFO] tez-perf-analyzer .................................. SUCCESS [  0.033 s]
[INFO] tez-job-analyzer ................................... SUCCESS [  0.492 s]
[INFO] tez-javadoc-tools .................................. SUCCESS [  0.130 s]
[INFO] hadoop-shim-impls .................................. SUCCESS [  0.023 s]
[INFO] hadoop-shim-2.7 .................................... SUCCESS [  0.149 s]
[INFO] tez-dist ........................................... SUCCESS [ 22.565 s]
[INFO] Tez ................................................ SUCCESS [  0.026 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:42 min
[INFO] Finished at: 2021-06-08T10:00:43+08:00
[INFO] ------------------------------------------------------------------------
[song@song apache-tez-0.9.2-src-6.3.4]$ ll tez-dist/target/
total 84688
drwxrwxr-x 2 song song     4096 Jun  8 10:00 archive-tmp
drwxrwxr-x 2 song song     4096 Jun  8 10:00 maven-archiver
drwxrwxr-x 3 song song     4096 Jun  8 10:00 tez-0.9.2
drwxrwxr-x 3 song song     4096 Jun  8 10:00 tez-0.9.2-minimal
-rw-rw-r-- 1 song song 15618156 Jun  8 10:00 tez-0.9.2-minimal.tar.gz
-rw-rw-r-- 1 song song 71075176 Jun  8 10:00 tez-0.9.2.tar.gz
-rw-rw-r-- 1 song song     2867 Jun  8 10:00 tez-dist-0.9.2-tests.jar

Recommended: Run without superuser permission, or as a non-root user.

编译问题汇总

https://cwiki.apache.org/confluence/display/TEZ/Build+errors+and+solutions#space-menu-link-content

安装部署Tez

目录结构

[song@song apache-tez-0.9.2-src-6.3.4]$ ll tez-dist/target/
total 84688
drwxrwxr-x 2 song song     4096 Jun  8 10:00 archive-tmp
drwxrwxr-x 2 song song     4096 Jun  8 10:00 maven-archiver
drwxrwxr-x 3 song song     4096 Jun  8 10:00 tez-0.9.2
drwxrwxr-x 3 song song     4096 Jun  8 10:00 tez-0.9.2-minimal
-rw-rw-r-- 1 song song 15618156 Jun  8 10:00 tez-0.9.2-minimal.tar.gz
-rw-rw-r-- 1 song song 71075176 Jun  8 10:00 tez-0.9.2.tar.gz
-rw-rw-r-- 1 song song     2867 Jun  8 10:00 tez-dist-0.9.2-tests.jar

tez-0.9.2和tez-0.9.2-minimal之间的区别在于是否包含hadoop的包。

<property>
        <name>tez.use.cluster.hadoop-libs</name>
        <value>true</value>
        <description>使用hadoop自身的lib包,设置为true的话可以使用minimal的tez包,false的话需要使用tez-0.10.0.tar.gz的包</description>
    </property>

Tez包上传HDFS

将打包后的文件上传到HDFS中,方便集群的其他节点使用。

[alluxio@alluxio115 ~]$ cd 6.3.4/
[alluxio@alluxio115 6.3.4]$ ll
total 84668
-rw-r----- 1 alluxio alluxio 15618156 Jun  8 10:25 tez-0.9.2-minimal.tar.gz
-rw-r----- 1 alluxio alluxio 71075176 Jun  8 10:25 tez-0.9.2.tar.gz
[alluxio@alluxio115 6.3.4]$ hdfs dfs -mkdir /tez
[alluxio@alluxio115 6.3.4]$ hdfs dfs -put tez-0.9.2.tar.gz /tez
[alluxio@alluxio115 6.3.4]$ hdfs dfs -chmod -R 777 /tez
[alluxio@alluxio115 6.3.4]$ hdfs dfs -ls /tez
Found 1 items
-rwxrwxrwx   3 alluxio supergroup   71075176 2021-06-08 10:28 /tez/tez-0.9.2.tar.gz

配置tez

hive-site.xml 的 Hive 服务高级配置代码段(安全阀) 中配置如下:

<configuration>
    <property>
        <name>tez.lib.uris</name>
        <value>${fs.defaultFS}/tez/tez-0.9.2.tar.gz</value>
    </property>
        <property>
        <name>tez.use.cluster.hadoop-libs</name>
        <value>false</value>
    </property>
</configuration>
525310c6d757e34c1253e8f7d2ee7b9a.webp

注意:好多教程中都是写在 hive-site.xml 的 Hive 客户端高级配置代码段(安全阀) 中进行配置,当适配 cdh6.3.4和tez0.9.2中不适配,报如下错误:

INFO  : Tez session hasn't been created yet. Opening session
ERROR : Failed to execute tez graph.
org.apache.tez.dag.api.TezUncheckedException: Invalid configuration of tez jars, tez.lib.uris is not defined in the configuration

更改完此配置后,重启 Hive Metastore Server和HiveServer2即可

配置客户端

此步骤只需要在所有 HiveServer2 节点操作即可

1、准备tez lib包

# 复制tez到HiveServer2节点
[alluxio@alluxio115 ~]$ scp -r 6.3.4/ alluxio117:~
[alluxio@alluxio115 ~]$ ssh alluxio117
[alluxio@alluxio117 ~]$ cd 6.3.4/
[alluxio@alluxio117 6.3.4]$ ll
total 84668
-rw-r----- 1 alluxio alluxio 15618156 Jun  8 10:44 tez-0.9.2-minimal.tar.gz
-rw-r----- 1 alluxio alluxio 71075176 Jun  8 10:44 tez-0.9.2.tar.gz
[alluxio@alluxio117 6.3.4]$ mkdir tez-0.9.2-minimal
[alluxio@alluxio117 6.3.4]$ tar -zxvf tez-0.9.2-minimal.tar.gz -C tez-0.9.2-minimal
[alluxio@alluxio117 6.3.4]$ chmod -R 777 tez-0.9.2-minimal
[alluxio@alluxio117 6.3.4]$ ll tez-0.9.2-minimal
total 6472
-rwxrwxrwx 1 alluxio alluxio    8804 Jun  8 09:59 hadoop-shim-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio    5451 Jun  8 10:00 hadoop-shim-2.7-0.9.2.jar
drwxrwxrwx 2 alluxio alluxio    4096 Jun  8 10:48 lib
-rwxrwxrwx 1 alluxio alluxio   15045 Jun  8 09:56 LICENSE
-rwxrwxrwx 1 alluxio alluxio    1465 Jun  8 09:56 LICENSE-BSD-3clause
-rwxrwxrwx 1 alluxio alluxio   36261 Jun  8 09:56 LICENSE-CDDLv1.1-GPLv2_withCPE
-rwxrwxrwx 1 alluxio alluxio    1045 Jun  8 09:56 LICENSE-MIT
-rwxrwxrwx 1 alluxio alluxio    4128 Jun  8 09:56 LICENSE-SIL_OpenFontLicense-v1.1
-rwxrwxrwx 1 alluxio alluxio     804 Jun  8 09:56 NOTICE
-rwxrwxrwx 1 alluxio alluxio 1032647 Jun  8 09:59 tez-api-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio    5362 Jun  8 09:59 tez-build-tools-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio   85867 Jun  8 09:59 tez-common-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio 1412823 Jun  8 09:59 tez-dag-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio   56796 Jun  8 09:59 tez-examples-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio   79101 Jun  8 09:59 tez-history-parser-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio   15267 Jun  8 10:00 tez-javadoc-tools-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio   78933 Jun  8 10:00 tez-job-analyzer-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio  296851 Jun  8 09:59 tez-mapreduce-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio   76044 Jun  8 09:59 tez-protobuf-history-plugin-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio  198893 Jun  8 09:59 tez-runtime-internals-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio  768818 Jun  8 09:59 tez-runtime-library-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio  158967 Jun  8 09:59 tez-tests-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio 2200870 Jun  8 09:59 tez-ui-0.9.2.war
-rwxrwxrwx 1 alluxio alluxio   28165 Jun  8 09:59 tez-yarn-timeline-history-0.9.2.jar
-rwxrwxrwx 1 alluxio alluxio    7743 Jun  8 09:59 tez-yarn-timeline-history-with-acls-0.9.2.jar

注意:确保tez-0.9.2-minimal下的所有Jar包有 777 权限

2、复制tez lib包到hive中

tez/*jar

[alluxio@alluxio117 6.3.4]$ [alluxio@alluxio117 6.3.4]$ sudo cp -p tez-0.9.2-minimal/*jar /opt/cloudera/parcels/CDH-6.3.4-1.cdh6.3.4.p0.6626826/lib/hive/lib/

注意:cp -p ,确保jar包在移动过程中权限777不被改变

tez/lib/*.jar

删除tez/lib/*.jar/opt/cloudera/parcels/CDH-6.3.4-1.cdh6.3.4.p0.6626826/lib/hive/lib/中重叠的jar包

tez/lib中包含slf4j的jar包,会打印较多日志,可以在客户端中去掉slf4j-api-1.7.10.jar、slf4j-log4j12-1.7.10.jar这两个jar包,减少日志打印。

# 删除重复的包
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/commons-cli-1.2.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/commons-codec-1.4.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/commons-io-2.4.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/commons-lang-2.6.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/commons-math3-3.1.1.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/guava-11.0.2.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/jersey-client-1.9.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/jetty-server-9.3.24.v20180605.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/jetty-util-9.3.24.v20180605.jar
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/jsr305-3.0.0.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/metrics-core-3.1.0.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/protobuf-java-2.5.0.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/servlet-api-2.5.jar 

# 删除日志包
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/slf4j-api-1.7.10.jar 
[alluxio@alluxio117 6.3.4]$ rm -rf tez-0.9.2-minimal/lib/slf4j-log4j12-1.7.10.jar 

删除后,剩余的jar包如下:

[alluxio@alluxio117 6.3.4]$ ll tez-0.9.2-minimal/lib/
total 4632
-rwxrwxrwx 1 alluxio alluxio  535731 Jun  1 15:42 async-http-client-1.8.16.jar
-rwxrwxrwx 1 alluxio alluxio  588337 Jun  1 15:22 commons-collections-3.2.2.jar
-rwxrwxrwx 1 alluxio alluxio  751238 Jun  1 15:24 commons-collections4-4.1.jar
-rwxrwxrwx 1 alluxio alluxio  770498 Jun  4 10:24 hadoop-mapreduce-client-common-3.0.0-cdh6.3.4.jar
-rwxrwxrwx 1 alluxio alluxio 1644594 Jun  4 10:24 hadoop-mapreduce-client-core-3.0.0-cdh6.3.4.jar
-rwxrwxrwx 1 alluxio alluxio  147952 Jun  1 15:42 jersey-json-1.9.jar
-rwxrwxrwx 1 alluxio alluxio   81743 Jun  1 15:22 jettison-1.3.4.jar
-rwxrwxrwx 1 alluxio alluxio  206280 Jun  1 15:25 RoaringBitmap-0.5.21.jar

tez/lib下的jar包复制到hive lib中:

[alluxio@alluxio117 6.3.4]$ sudo scp -p  tez-0.9.2-minimal/lib/* /opt/cloudera/parcels/CDH-6.3.4-1.cdh6.3.4.p0.6626826/lib/hive/lib/

重启HiveServer2,使其生效。

如果不配置客户端,则会报如下错误:

Error: Error running query: java.lang.NoClassDefFoundError: org/apache/tez/runtime/api/Event (state=,code=0)

3、整合kryo jar包

然后通过beeline运行tez,则会报如下错误:

Caused by: java.lang.ClassNotFoundException: com.esotericsoftware.kryo.Serializer
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 33 more

在HiveServer2上执行

[alluxio@alluxio117 ~]$ sudo cp -p /opt/cloudera/parcels/CDH-6.3.4-1.cdh6.3.4.p0.6626826/jars/kryo-* /opt/cloudera/parcels/CDH-6.3.4-1.cdh6.3.4.p0.6626826/lib/hive/auxlib/ 

如果报如下错误:

Caused by: java.lang.ClassNotFoundException: org.objenesis.strategy.InstantiatorStrategy

则还需要将kryo包放到hive lib目录下:

[alluxio@alluxio117 ~]$ sudo cp -p /opt/cloudera/parcels/CDH-6.3.4-1.cdh6.3.4.p0.6626826/jars/kryo-* /opt/cloudera/parcels/CDH-6.3.4-1.cdh6.3.4.p0.6626826/lib/hive/lib

如果还是报错(一般不会):则需要将kryo包打包到tez-0.9.2.tar.gz并上传到HDFS。

继续运行tez 任务,如果报如下错误:

ERROR : Status: Failed
ERROR : Vertex failed, vertexName=Map 1, vertexId=vertex_1623118396614_0002_1_00, diagnostics=[Vertex vertex_1623118396614_0002_1_00 [Map 1] killed/failed due to:ROOT_INPUT_INIT_FAILURE, Vertex Input: test initializer failed, vertex=vertex_1623118396614_0002_1_00 [Map 1], java.lang.ArithmeticException: / by zero

则需要设置tez container的大小:

set hive.tez.container.size=8192;

测试Tez

[alluxio@alluxio115 ~]$ beeline -u "jdbc:hive2://alluxio117.bigdata.cn:10000" -n "alluxio" -p ""
WARNING: Use "yarn jar" to launch YARN applications.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.3.4-1.cdh6.3.4.p0.6626826/jars/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.3.4-1.cdh6.3.4.p0.6626826/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://alluxio117.bigdata.cn:10000
Connected to: Apache Hive (version 2.1.1-cdh6.3.4)
Driver: Hive JDBC (version 2.1.1-cdh6.3.4)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 2.1.1-cdh6.3.4 by Apache Hive
0: jdbc:hive2://alluxio117.bigdata.cn:10000> set hive.execution.engine=tez;
No rows affected (0.085 seconds)
0: jdbc:hive2://alluxio117.bigdata.cn:10000> set hive.tez.container.size=8192;
No rows affected (0.014 seconds)
0: jdbc:hive2://alluxio117.bigdata.cn:10000> select count(1) from test;
INFO  : Compiling command(queryId=hive_20210608142254_0063675f-6649-4293-a06e-629c752fa7fd): select count(1) from test
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:_c0, type:bigint, comment:null)], properties:null)
INFO  : Completed compiling command(queryId=hive_20210608142254_0063675f-6649-4293-a06e-629c752fa7fd); Time taken: 0.118 seconds
INFO  : Executing command(queryId=hive_20210608142254_0063675f-6649-4293-a06e-629c752fa7fd): select count(1) from test
INFO  : Query ID = hive_20210608142254_0063675f-6649-4293-a06e-629c752fa7fd
INFO  : Total jobs = 1
INFO  : Launching Job 1 out of 1
INFO  : Starting task [Stage-1:MAPRED] in serial mode
INFO  : Session is already open
INFO  : Dag name: select count(1) from test (Stage-1)
INFO  : 

INFO  : Status: Running (Executing on YARN cluster with App id application_1623118396614_0002)

INFO  : Map 1: 0/1      Reducer 2: 0/1
INFO  : Map 1: 0(+1)/1  Reducer 2: 0/1
INFO  : Map 1: 1/1      Reducer 2: 0/1
INFO  : Map 1: 1/1      Reducer 2: 0(+1)/1
INFO  : Map 1: 1/1      Reducer 2: 1/1
INFO  : Completed executing command(queryId=hive_20210608142254_0063675f-6649-4293-a06e-629c752fa7fd); Time taken: 4.787 seconds
INFO  : OK
+------+
| _c0  |
+------+
| 2    |
+------+
1 row selected (5.146 seconds)
0: jdbc:hive2://alluxio117.bigdata.cn:10000> 

问题

InternalFutureFailureAccess

报错问题:

Caused by: java.lang.ClassNotFoundException: com.google.common.util.concurrent.internal.InternalFutureFailureAccess
 at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

解决方案:

在集群所有节点,将failureaccess-1.0.1.jar放到/opt/cloudera/parcels/CDH-6.3.4-1.cdh6.3.4.p0.6626826/lib/hive/lib

failureaccess-1.0.1.jar在maven中搜索下载即可。



good-icon 0
favorite-icon 0
收藏
回复数量: 0
    暂无评论~~
    Ctrl+Enter