设为首页 加入收藏

TOP

MetaException(message:Hive Schema version 2.3.0 does not match metastore's schema version 1.2.0
2019-05-13 12:56:45 】 浏览:113
Tags:MetaException message:Hive Schema version 2.3.0 does not match metastore' schema 1.2.0

环境
spark 2.2.0 hive 2.3.3
问题
用spark应用创建一张hive表后,在通过hive shell来操作hive时报如下错;

MetaException(message:Hive Schema version 2.3.0 does not match metastore's schema version 1.2.0

原因
spark应用创建表时,指定的schema版本为1.2.0,而hive的schema版本为2.3.0,版本不兼容导致
解决办法
临时解决:
在mysql(假定metastore的数据库为mysql)中,切换到hive库,执行如下命令

    UPDATE VERSION SET SCHEMA_VERSION='2.3.0', VERSION_COMMENT='fix conflict' where VER_ID=1;

这样解决后,当通过spark应用再创建新表时仍会报错。
更好的解决:
1. metastore模式使用remote方式
2. 通过cdh来解决版本问题

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇spark on hive原理与环境搭建 &nb.. 下一篇        ..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目