【发布时间】:2020-02-04 18:49:41
【问题描述】:
我们最近将预生产环境从 Spark 2.3 更新到 Spark 2.4.0
长期以来,我们在 Hive Metastore 中创建了大量表,由 2 个字段分区,其中一个是 String,另一个是 BigInt。
我们使用 Spark 2.3 读取这些表没有问题,但升级到 Spark 2.4 后,我们每次运行 SW 时都会收到以下日志:
log_filterBIGINT.out:
Caused by: MetaException(message:Filtering is supported only on 字符串类型的分区键)由以下原因引起: MetaException(message:Filtering 仅在分区键上支持 type string) 原因:MetaException(message:Filtering is supported 仅适用于字符串类型的分区键)
hadoop-cmf-hive-HIVEMETASTORE-isblcsmsttc0001.scisb.isban.corp.log.out.1:
2020-01-10 09:36:05,781 错误 org.apache.hadoop.hive.metastore.RetryingHMSHandler: [pool-5-thread-138]:MetaException(消息:仅支持过滤 在字符串类型的分区键上)
2020-01-10 11:19:19,208 错误 org.apache.hadoop.hive.metastore.RetryingHMSHandler: [pool-5-thread-187]:MetaException(消息:仅支持过滤 在字符串类型的分区键上)
2020-01-10 11:19:54,780 错误 org.apache.hadoop.hive.metastore.RetryingHMSHandler: [pool-5-thread-167]:MetaException(消息:仅支持过滤 在字符串类型的分区键上)
我们知道,从 Spark 的角度来看,最佳实践是对分区列使用“STRING”类型,但我们需要探索一种能够轻松部署的解决方案,因为使用bigiint 类型的列分区。
作为第一个解决方案,我们尝试在 Spark Submmit 中将 spark.sql.hive.manageFilesourcePartitions 参数设置为 false,但在重新运行 SW 后,错误仍然存在。
社区中是否有人遇到过同样的问题?解决方案是什么?
【问题讨论】:
标签: apache-spark