Closed
Description
With current version, Hiveserver2 fails to start and prints this error in /var/log/hiveserver2.err
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1357)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1338)
at org.apache.hadoop.mapred.JobConf.setJar(JobConf.java:518)
at org.apache.hadoop.mapred.JobConf.setJarByClass(JobConf.java:536)
at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:430)
at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5141)
at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:5099)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:97)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:81)
at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:1141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
Relates to https://issues.apache.org/jira/browse/HIVE-22915
This issue is caused by having 2 Guava versions in the classpath. Guava has been updated due to Hadoop 3.1.4 update.
Problem can be fixed with
$ rm /opt/tdp/hive/lib/guava-19.0.jar
$ cp /opt/tdp/hadoop/share/hadoop/hdfs/lib/guava-27.0-jre.jar /opt/tdp/hive/lib/
This fix is not appropriate, this guava issue should be fixed in the apache hive build. Maybe exclude hive guava, backport some fix?
Metadata
Metadata
Assignees
Labels
No labels