启动 Hive Metastore 和 HiveServer2 的问题

问题描述

我是 Hive 环境的新手。

启动 Hivemetastore 或 HiveServer2 时出现以下错误

Exception in thread "org.apache.hadoop.hive.common.JvmPauseMonitor$Monitor@4330e9c7" java.lang.IllegalAccessError: tried to access method com.google.common.base.Stopwatch.<init>()V from class org.apache.hadoop.hive.common.JvmPauseMonitor$Monitor
    at org.apache.hadoop.hive.common.JvmPauseMonitor$Monitor.run(JvmPauseMonitor.java:176)
    at java.lang.Thread.run(Thread.java:748)

我能够成功启动 Hive CLI:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoopusr/apache-hive-2.3.8-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/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]

Logging initialized using configuration in jar:file:/home/hadoopusr/apache-hive-2.3.8-bin/lib/hive-common-2.3.8.jar!/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark,tez) or using Hive 1.X releases.
hive> 

还为 Hive metastore 配置了 MysqL

MysqL> show tables;
+---------------------------+
| Tables_in_metastore       |
+---------------------------+
| AUX_TABLE                 |
| ...                |
+---------------------------+
57 rows in set (0.00 sec)

已启动所有必需的 hadoop 服务

28993 Datanode
29604 ResourceManager
29334 Jps
29782 NodeManager
28823 NameNode
29305 SecondaryNameNode
23387 RunJar

Hive-Site.xml

<configuration>
        <property>
                <name>javax.jdo.option.ConnectionURL</name>
                <value>jdbc:MysqL://127.0.0.1:3306/metastore?useSSL=false</value>
                <!-- <value>jdbc:MysqL://127.0.0.1/metastore?useSSL=false</value> -->
                <description>Metadata is stored in a MysqL server</description>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionDriverName</name>
                <value>com.MysqL.jdbc.Driver</value>
                <description>MysqL JDBC driver class</description>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionUserName</name>
                <value>***</value>
                <description>user name for connecting to MysqL server</description>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionPassword</name>
                <value>****</value>
                <description>password for connecting to MysqL server</description>
        </property>
</configuration>

.bashrc 文件

export HADOOP_HOME=/usr/local/hadoop/
export HADOOP_INSTALL=/usr/local/hadoop/
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib/native"
#added on 18th feb as was facing issue while starting hiveserver
export CLAsspATH=$CLAsspATH:/usr/local/Hadoop/lib/*

#appending the hive variables
export HIVE_HOME=/home/hadoopusr/apache-hive-2.3.8-bin
export PATH=$PATH:$HIVE_HOME/bin

export CLAsspATH=$CLAsspATH:/home/hadoopusr/apache-hive-2.3.8-bin/lib/*

你能帮忙吗! 提前致谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)