【发布时间】:2018-02-09 16:45:52
【问题描述】:
我正在尝试在 Windows 10 上安装 Hive。尝试启动 Hive 时收到以下错误:
在 hive 配置上应用授权策略时出错:org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instance org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
我使用 Derby 作为 Hive 的后端。这是我的 hive-site.xml 文件:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:derby://localhost:1527/metastore_db;create=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>org.apache.derby.jdbc.ClientDriver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>hive.server2.enable.impersonation</name>
<description>Enable user impersonation for HiveServer2</description>
<value>true</value>
</property>
<property>
<name>hive.server2.authentication</name>
<value>NONE</value>
<description>
Client authentication types.
NONE: no authentication check
LDAP: LDAP/AD based authentication
KERBEROS: Kerberos/GSSAPI authentication
CUSTOM: Custom authentication provider
(Use with property hive.server2.custom.authentication.class)
</description>
</property>
<property>
<name>datanucleus.autoCreateTables</name>
<value>True</value>
</property>
</configuration>
我先启动networkServer:
d:\Hadoop-2.8.1\sbin>startNetworkServer -h 0.0.0.0
Fri Feb 09 08:57:01 EST 2018 : Security manager installed using the Basic server security policy.
Fri Feb 09 08:57:01 EST 2018 : Apache Derby Network Server - 10.14.1.0 - (1808820) started and ready to accept connections on port 1527
然后运行 start-all.cmd:
d:\Hadoop-2.8.1\sbin>start-all.cmd
检查 NetworkServerControl:
d:\Hadoop-2.8.1\sbin>jps -m
12532 ResourceManager
7156 NetworkServerControl start -h 0.0.0.0
20504 Jps -m
27336 DataNode
22604 NodeManager
492 NameNode
最后,我尝试启动 Hive,这时我收到错误消息:
d:\Hadoop-2.8.1\sbin>hive
我注意到在 hive 的 bin 目录中没有创建 metastore_db:
Directory of d:\Hadoop-2.8.1\hive2_1\bin
02/06/2018 01:48 PM <DIR> .
02/06/2018 01:48 PM <DIR> ..
11/28/2016 04:32 PM 1,261 beeline
11/28/2016 04:32 PM 2,553 beeline.cmd
02/06/2018 01:48 PM <DIR> ext
11/28/2016 04:35 PM 8,692 hive
11/28/2016 04:32 PM 1,584 hive-config.cmd
02/09/2018 08:20 AM 1,900 hive-config.sh
11/28/2016 04:32 PM 8,823 hive.cmd
11/28/2016 04:32 PM 885 hiveserver2
11/28/2016 04:32 PM 1,030 hplsql
11/28/2016 04:32 PM 2,278 hplsql.cmd
11/28/2016 04:32 PM 832 metatool
11/28/2016 04:32 PM 884 schematool
11 File(s) 30,722 bytes
3 Dir(s) 427,455,606,784 bytes free
有人知道我哪里出错了吗?
【问题讨论】:
标签: hadoop hive windows-10 authorization