gpt4 book ai didi

hadoop - 我安装了Hadoop 3.2.1,在hadoop的顶部安装了centos7的配置单元,并得到了错误

转载 作者:行者123 更新时间:2023-12-02 21:58:35 24 4
gpt4 key购买 nike

我安装了Hadoop 3.2.1,hadoop的顶部在centos7上安装了hive,并得到以下错误。如何使用mysql安装Hive?

[root@master hive]# hive
which: no hbase in (/opt/hive/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/spark/bin:/opt/hadoop/bin:/opt/spark/bin:/root/.local/bin:/root/bin:/root/kafka_2.11-2.3.1/bin:/usr/java/jdk1.8.0_141-cloudera/bin:/opt/spark/bin:/opt/hive/bin)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/hive/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/hadoop/share/hadoop/common/lib/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]
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:536)
at org.apache.hadoop.mapred.JobConf.setJarByClass(JobConf.java:554)
at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:448)
at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:4042)
at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:4000)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:81)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:65)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:702)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:686)
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:323)
at org.apache.hadoop.util.RunJar.main(RunJar.java:236)

最佳答案

我已经在Ubuntu 18.04上安装了Hadoop 3.2.1和Hive 2.3.1。我遇到了这个异常,在网上冲浪了很多之后,我在以下链接中找到了解决方案:

https://issues.apache.org/jira/browse/HIVE-22915

$ rm ~/apache-hive-3.1.2-bin/lib/guava-19.0.jar

$ cp ~/hadoop-3.2.1/share/hadoop/hdfs/lib/guava-27.0-jre.jar ~/apache-hive-3.1.2-bin/lib/

解决该问题后,运行 hive 壳时会出现一些错误。要解决这些错误,请在YouTube上观看此视频 https://www.youtube.com/watch?v=fMT1UTkfI8c

关于hadoop - 我安装了Hadoop 3.2.1,在hadoop的顶部安装了centos7的配置单元,并得到了错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58903865/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com