在Windows上运行配置单元时出错

时间:2018-03-23 18:15:27

标签: hadoop hive

当我尝试在Windows上运行配置单元时出现以下错误,我的hadoop在Windows上正常运行:

Connecting to jdbc:hive2://
Error applying authorization policy on hive configuration: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
Beeline version 2.1.1 by Apache Hive
Error applying authorization policy on hive configuration: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
Connection is already closed.

这是我的hive-site.xml:

 <property>
  <name>hive.metastore.local</name>
  <value>true</value>
</property>
   <property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/metastore?createDatabaseIfNotExist=true</value>
<description>metadata is stored in a MySQL server</description>
</property>
<property>
  <name>hive.metastore.local</name>
  <value>true</value>
</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>hive</value>
<description>user name for connecting to mysql server </description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hivepwd</value>
<description>password for connecting to mysql server </description>
</property>
<property>
 <name>hive.metastore.uris</name>
 <value>thrift://localhost:9083</value>
 <description>Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.</description>
  </property>
   <property>
  <name>hive.server2.enable.impersonation</name>
  <value>true</value>
</property>
  <property>
    <name>hive.exec.script.wrapper</name>
    <value/>
    <description/>
  </property>
  <property>
    <name>hive.exec.plan</name>
    <value/>
    <description/>
  </property>
  <property>
  <name>datanucleus.autoCreateSchema</name>
  <value>true</value>
</property>
<property>
  <name>datanucleus.fixedDatastore</name>
  <value>true</value>
</property>
<property>
 <name>datanucleus.autoCreateTables</name>
 <value>True</value>
 </property>

这是我的hive-env.sh:

> export HADOOP_HOME=C:\Users\namaagarwal\Desktop\hadoop-2.6.2 export
> JAVA_HOME=C:\Progra~1\Java\jdk1.8.0_151
> HIVE_CONF_DIR=C:\Users\namaagarwal\Desktop\hadoop-2.6.2\hive\apache-hive-2.1.1-bin\conf

创建了mysql用户,并将derbyclient.jar和mysql-connector-java-5.0.5.jar放在hive / bin / lib目录中。我还使用SOURCE C为我的数据库创建了模式:/Users/namaagarwal/Desktop/hadoop-2.6.2/hive/apache-hive-2.1.1-bin/scripts/metastore/upgrade/mysql/hive-txn-架构2.0.0.mysql.sql;

我搜索了很多,但没有得到任何解决方案。

我错过了什么?

0 个答案:

没有答案