设为首页 加入收藏

TOP

MetaException(message:Hive Schema version 2.1.0 does not match metastore's schema version 1.2.0 Meta
2019-05-13 13:01:57 】 浏览:114
Tags:MetaException message:Hive Schema version 2.1.0 does not match metastore' schema 1.2.0 Meta
版权声明:本文为博主九师兄(QQ群:spark源代码 198279782 欢迎来探讨技术)原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_21383435/article/details/81011227

昨天还好好的,今天问题突然变成这样子了

lcc@lcc ~$ hive --service metastore
Starting Hive Metastore Server
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/lcc/soft/hive/hive/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/lcc/soft/hadoop/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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.apache.logging.slf4j.Log4jLoggerFactory]
MetaException(message:Hive Schema version 2.1.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)
    at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:92)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6602)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6597)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:6855)
    at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:6782)
    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:221)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: MetaException(message:Hive Schema version 2.1.0 does not match metastore's schema version 1.2.0 Metastore is not upgraded or corrupt)
    at org.apache.hadoop.hive.metastore.ObjectStore.checkSchema(ObjectStore.java:7769)
    at org.apache.hadoop.hive.metastore.ObjectStore.verifySchema(ObjectStore.java:7732)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

这个问题是版本号冲突导致的

2.解决方法(测试可用)

2.1 解决方法1:修改版本号

查看mysql,可以看到这里是

这里写图片描述
可以在这里直接修改

这里写图片描述

然后直接重启服务,正常了

lcc@lcc ~$ hive --service metastore

命令修改

1.登陆mysql,修改hive metastore版本:
进行mysql:mysql -uroot -p (123456)
use hive;
select * from version;
update VERSION set SCHEMA_VERSION='2.1.1' where  VER_ID=1;

2.2 解决方法2:关闭版本验证

简单粗暴:在hvie-site.xml中关闭版本验证

<property>
    <name>hive.metastore.schema.verification</name>
    <value>false</value>
</property>
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇MetaException(message:For direc.. 下一篇Exception in thread "main&..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目