启动hive时出现:Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

Exception in thread "main" java.lang.RuntimeException: 
java.lang.RuntimeException: Unable to instantiate 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
         at 
org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:449)
         at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:634)
         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:578)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:601)
         at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: java.lang.RuntimeException: Unable to instantiate 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
         at 
org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1481)
         at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.(RetryingMetaStoreClient.java:64)
         at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:74)
         at 
org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2674)
         at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2693)
         at 
org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:430)
         ... 7 more
 
解决方法:
网上对于这个问题的答案是众说纷纭,我也尝试了网上所说的各种办法可是问题依旧,我试着更换MySQL版本,错误继续、试着升级hive错误继续、修改配置文件,错误继续、总之试了很多方法还是不行。。。
于是想到我的hadoop版本是1.2.1,而用的hive第一次是1.0.1,第二次是1.2.1,这两次尝试均出现以上错误。所以试着把hive降级版本,选择了hive0.9.0,结果显示:


ok!成功了!果然是hive的版本过高导致的问题,所以其他伙伴有类似错误请考虑版本的问题!!
 
 

你可能感兴趣的:(hive)