HIVE 安装完mysql后,进行初始化schematool -initSchema -dbType mysql -verbose,报错Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
比较hadoop和hive的guava*.jar 包,用较新的把较旧的覆盖
对比:
[root@master lib]# ll *guava*
-rw-r--r--. 1 root root 2308517 Sep 27 2018 guava-19.0.jar
-rw-r--r--. 1 root root 971309 May 21 2019 jersey-guava-2.25.1.jar
[root@master lib]# mv guava-19.0.jar guava-19.0.bak
[root@master lib]#
[root@master lib]#
[root@master lib]# ll *guava*
-rw-r--r--. 1 root root 2308517 Sep 27 2018 guava-19.0.bak
-rw-r--r--. 1 root root 2747878 Sep 12 2019 guava-27.0-jre.jar
-rw-r--r--. 1 root root 971309 May 21 2019 jersey-guava-2.25.1.jar
拷贝:
./share/hadoop/common/lib/guava-27.0-jre.jar
./share/hadoop/common/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
./share/hadoop/hdfs/lib/guava-27.0-jre.jar
./share/hadoop/hdfs/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
[root@master hadoop-3.1.3]# cp -p ./share/hadoop/common/lib/guava-27.0-jre.jar /opt/module/hive/lib/