启动spark-sql时报错Caused by: MetaException(message:Hive Schema version 2.3.0 does not match metastore‘s

一、报错信息

Caused by: MetaException(message: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)
	at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:92)
	at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:6902)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:164)
	at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:70)
	... 46 more

二、解决方法

在hvie-site.xml中将hive.metastore.schema.verification参数设置为false(如果.xml文件中没有,可以添加上配置参数)

<property>
    <name>hive.metastore.schema.verification</name>
    <value>false</value>
</property>

设置完之后,spark-sql就可以正常启动了
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_43520450/article/details/129409173