Windows 启动Hive 提示:Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClien解析

虾米哥 阅读:289 2021-03-31 14:11:24 评论:0

Windows 10 启动Hive 提示如下错误信息:

2020-07-06 11:51:18,958 WARN metadata.Hive: Failed to register all functions. 
java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1654) 
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:80) 
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:130) 
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:101) 
        at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3367) 
        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3406) 
        at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3386) 
        at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3640) 
        at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:236) 
        at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:221) 
        at org.apache.hadoop.hive.ql.metadata.Hive.<init>(Hive.java:366) 
        at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:310) 
        at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:290) 
        at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:266) 
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:558) 
        at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:531) 
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705) 
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641) 
        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:239) 
        at org.apache.hadoop.util.RunJar.main(RunJar.java:153) 
Caused by: java.lang.reflect.InvocationTargetException 
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1652) 
        ... 23 more

造成原因:没有正常启动Hive 的 Metastore Server服务进程。

解决办法:启动Hive 的 Metastore Server服务进程,执行如下命令:hive --service metastore

C:\hive\apache-hive-2.1.1-bin\bin>hive --service metastore 
"Starting Hive Metastore Server" 
SLF4J: Class path contains multiple SLF4J bindings. 
SLF4J: Found binding in [jar:file:/C:/hadoop/hadoop-3.0.0/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: Found binding in [jar:file:/C:/hive/apache-hive-2.1.1-bin/lib/log4j-slf4j-impl-2.4.1.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.slf4j.impl.Log4jLoggerFactory] 
2020-07-06 11:54:30,726 INFO conf.HiveConf: Found configuration file file:/C:/hive/apache-hive-2.1.1-bin/conf/hive-site.xml 
2020-07-06 11:54:32,582 INFO metastore.HiveMetaStore: STARTUP_MSG: 
/************************************************************

 

声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

发表评论
搜索
排行榜
KIKK导航

KIKK导航

关注我们