Apache spark Spark中的配置单元元存储警告

Apache spark Spark中的配置单元元存储警告,apache-spark,hive,metastore,Apache Spark,Hive,Metastore,在启动spark shell时,我经常收到这样的警告 WARN ObjectStore: Version information not found in metastore. hive.metastore.schema.verification is not enabled so recording the schema version 1.2.0 WARN ObjectStore: Failed to get database default, returning NoSuchObjec

在启动spark shell时,我经常收到这样的警告

WARN ObjectStore: Version information not found in 
metastore. hive.metastore.schema.verification is not enabled so 
recording the schema version 1.2.0
WARN ObjectStore: Failed to get database default, returning NoSuchObjectException
java.lang.RuntimeException:
它们是什么意思?我该如何预防它。
此警告出现在2.0.2和1.6.2上,可能也出现在其他版本上。

我认为您的配置单元版本太旧,请尝试将配置单元升级到1.2.0或更高版本。
另一种选择是使用与hive 0.13兼容的spark 1.4。

默认情况下,hive.metastore.schema.verification设置为false。另一个配置设置为false以避免此错误。在hive-site.xml中设置以下配置。 (发生此问题的原因是元存储中的版本表为空)


hive.metastore.schema.verification
假的
hive.metastore.schema.verification.record.version
假的

我在Spark 2.4.7中遇到了同样的问题;我没有找到hive-site.xml。它很可能是包装好的。但是,我通过执行以下导入并创建一个新的spark会话来启用请求的验证;在火花壳上

  • scala>import org.apache.spark.sql.Row
  • scala>import org.apache.spark.sql.SparkSession
  • scala>val spark=SparkSession.builder.appName(“spark配置单元示例”).config(“spark.sql.warehouse.dir”,”).enableHiveSupport().getOrCreate()

什么是hive和spark的版本?你升级过什么吗?我的意思是,早些时候它被发现了,现在您面临一些问题?Spark是2.0.2,但其他版本的Spark上也出现了相同的错误。您好,我面临相同的问题,解决方案是什么?我在使用Spark SQL时在Spark 2.4.4上看到了完全相同的错误。
<property>
         <name>hive.metastore.schema.verification</name>
         <value>false</value>
</property>

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