环境:spark2.11 hive2.2 hadoop2.8.2
hive shell 运行成功!并且没有错误或警告。
但是当运行application.sh时,启动失败
/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)
...
我尝试了很多方法来解决这个错误,但错误仍然发生。
怎么修?
可能 hive 指的是 hive 的另一个版本(配置不同)。
执行以下命令并查看输出是否与 /usr/local/hive 不同。
$which hive
如果两者是相同的 hive 目录,请在 hive-site.xml 中添加以下属性。
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)