设为首页 加入收藏

TOP

Hive-异常处理Hive Schema version 2.3.0 does not match metastore's schema version 1.2.0 Metastore is not
2019-02-10 01:00:25 】 浏览:18
Tags:Hive- 异常 处理 Hive Schema version 2.3.0 does not match metastore' schema 1.2.0 Metastore
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u014804456/article/details/77747720

在使用Hive shell的时候突然遇到:

# hive

# use default;

hive> use default;
FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient


去查看log日志:

hive.log 文件


发现如下异常:


at java.lang.reflect.Method.invoke(Method.java:498) ~[:1.8.0_144]
at org.apache.hadoop.util.RunJar.run(RunJar.java:234) ~[hadoop-common-2.8.0.jar:]
at org.apache.hadoop.util.RunJar.main(RunJar.java:148) ~[hadoop-common-2.8.0.jar:]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[:1.8.0_144]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[:1.8.0_144]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[:1.8.0_144]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[:1.8.0_144]
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1699) ~[hive-exec-2.3.0.jar:2.3.0]
... 32 more
Caused by: org.apache.hadoop.hive.metastore.api.MetaException: Hive Schema version 2.3.0 does not match metastore's schema version 1.2.0 Metastore is not upgraded or corrupt
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:83) ~[hive-exec-2.3.0.jar:2.3.0]
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:92) ~[hive-exec-2.3.0.jar:2.3.0]
at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6889) ~[hive-exec-2.3.0.jar:2.3.0]
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:159) ~[hive-exec-2.3.0.jar:2.3.0]
at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:70) ~[hive-exec-2.3.0.jar:2.3.0]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[:1.8.0_144]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[:1.8.0_144]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[:1.8.0_144]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[:1.8.0_144]
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1699) ~[hive-exec-2.3.0.jar:2.3.0]
... 32 more

最后在github上找到解决方法:

更新一下:

https://github.com/apache/hive/blob/master/metastore/scripts/upgrade/mssql/upgrade-2.2.0-to-2.3.0.mssql.sql


mysql -u root -p

# input your password


# SELECT 'Upgrading MetaStore schema from 2.2.0 to 2.3.0' AS MESSAGE;

:r 025-HIVE-16399.mssql.sql


#UPDATE VERSION SET SCHEMA_VERSION='2.3.0', VERSION_COMMENT='Hive release version 2.3.0' where VER_ID=1;
#SELECT 'Finished upgrading MetaStore schema from 2.2.0 to 2.3.0' AS MESSAGE;






编程开发网
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇第27天:   lateral View.. 下一篇hive:Access denied for user ..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

array(4) { ["type"]=> int(8) ["message"]=> string(24) "Undefined variable: jobs" ["file"]=> string(32) "/mnt/wp/cppentry/do/bencandy.php" ["line"]=> int(214) }