消息:蜂房模式版本1.2.0与Metastore的模式版本2.1.0不匹配Metastore未升级或损坏 [英] message:Hive Schema version 1.2.0 does not match metastore's schema version 2.1.0 Metastore is not upgraded or corrupt
问题描述
环境:spark2.11 hive2.2 hadoop2.8.2
enviroment: spark2.11 hive2.2 hadoop2.8.2
蜂巢壳运行成功!并且没有错误或警告. 但是当运行application.sh时,启动失败
hive shell run successfully! and hava no error or warning. but when run application.sh, start failed
/usr/local/spark/bin/spark-submit \
--class cn.spark.sql.Demo \
--num-executors 3 \
--driver-memory 512m \
--executor-memory 512m \
--executor-cores 3 \
--files /usr/local/hive/conf/hive-site.xml \
--driver-class-path /usr/local/hive/lib/mysql-connector-java.jar \
/usr/local/java/sql/sparkstudyjava.jar \
和错误提示:
Exception in thread "main" java.lang.IllegalArgumentException: Error while
instantiating 'org.apache.spark.sql.hive.HiveSessionState':
...
Caused by: java.lang.IllegalArgumentException: Error while instantiating
'org.apache.spark.sql.hive.HiveExternalCatalog':
...
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Unable to
instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
...
Caused by: java.lang.RuntimeException: Unable to instantiate
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
...
Caused by: MetaException(message:Hive Schema version 1.2.0 does not match
metastore's schema version 2.1.0 Metastore is not upgraded or corrupt)
...
我尝试了许多方法来解决此错误,但仍然会发生错误. 如何解决?
i try many method to solving this errors, but errors still occurs. how to fix?
推荐答案
配置单元可能是指配置单元的另一个版本(配置不同). 执行以下命令查看输出是否与/usr/local/hive不同.
Probably hive is referring to another version of hive (which is configured differently). Execute below command & see if output is different from /usr/local/hive.
$which hive
如果两个都是相同的配置单元目录,请在hive-site.xml中添加以下属性.
If both are same hive directories, add below properties in hive-site.xml.
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
这篇关于消息:蜂房模式版本1.2.0与Metastore的模式版本2.1.0不匹配Metastore未升级或损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!