Error when starting spark-sql Caused by: MetaException(message:Hive Schema version 2.3.0 does not match metastore's

1. Error message

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

Two, the solution

Set the hive.metastore.schema.verification parameter in hvie-site.xml to false(if not in the .xml file, you can add configuration parameters)

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

After setting, spark-sql can start normally
insert image description here

Guess you like

Origin blog.csdn.net/weixin_43520450/article/details/129409173