HiveException java.lang.RuntimeException:

时间:2018-07-21 20:37:23

标签: hadoop hive

尝试显示数据库时出现此异常。

vallabh@vallabh:~$ hive


hive> show databases;

失败:HiveException java.lang.RuntimeException:无法实例化org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

以下是我的.bashrc文件

# Set HIVE_HOME
export HIVE_HOME=/opt/apache-hive-3.0.0-bin
export HIVE_CONF_DIR=/opt/apache-hive-3.0.0-bin/conf/
export PATH=$PATH:$HIVE_HOME/bin
export CLASSPATH=$CLASSPATH:/opt/hadoop-3.0.1/lib/*:.
export CLASSPATH=$CLASSPATH:/opt/apache-hive-3.0.0-bin/lib/*:

以下是我的hive-env.sh文件

# Set HADOOP_HOME to point to a specific hadoop install directory
export HADOOP_HOME=/opt/hadoop-3.0.1
# Hive Configuration Directory can be controlled by:
export HIVE_CONF_DIR=/opt/apache-hive-3.0.0-bin/conf

以下是我的hive-config.sh文件

export HADOOP_HOME=/opt/hadoop-3.0.1

以下是我的hive-site.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="confguration.xsl"?><!--
Licensed to the Apache Software Foundation (ASF) under one or more
contri utor license agreements. See the NOTICE fle distri uted with
this work for additional information regarding copyright ownership.
The ASF licenses this fle to You under the Apache License, Version 2.0
(the "License"); you may not use this fle except in compliance with
the License. You may o tain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required y applica le law or agreed to in writing, software-->




<confguration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jd c:mysql://localhost/metastore?createDatabaseIfNotExist=true</value>
<description>
JDBC connect string for a JDBC metastore.
To use SSL to encrypt/authenticate the connection, provide data ase-specifc SSL fag in
the connection URL.
For example, jd c:postgresql://myhost/d ?ssl=true for postgres database.
</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>

<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hiveuser</value>
<description>Username to use against metastore database</description>
</property>



<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>password@123</value>
<description>password to use against metastore database</description>
</property>
<property>
<name>datanucleus.autoCreateSchema</name>
<value>true</value>
</property>
<property>
<name>datanucleus.fxedDatastore</name>


<value>true</value>
</property>
<property>
<name>datanucleus.autoCreateTables</name>
<value>True</value>
</property>
</confguration>

该错误的可能原因是什么??

0 个答案:

没有答案