Apache spark Spark中的配置单元元存储警告
在启动spark shell时,我经常收到这样的警告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
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()
<property>
<name>hive.metastore.schema.verification</name>
<value>false</value>
</property>
<property>
<name>hive.metastore.schema.verification.record.version</name>
<value>false</value>
</property>