1

我在 .csv 中有一个包含大约 180000000 条记录的数据集,我通过胶水作业在 hudi parquet 中进行了转换。它被一列分隔。它全部写入成功,但是在胶水作业中读取hudi数据需要太长时间(> 30min)。

我试图只读取一个分区

spark.read.format("hudi").load("s3://somes3bucket").
  where("partition1 = 'somevalue') 

但没有区别。

我也尝试了增量读取,但它总是返回零记录。

incremental_read_options = {
 'hoodie.datasource.query.type': 'incremental',
 'hoodie.datasource.read.begin.instanttime': '000',
 'hoodie.datasource.read.incr.path.glob': ''
 }
 DFhudi = spark.read.format("org.apache.hudi").options(**incremental_read_options).load(path_hudi)

我在该表上的 Athena 中的分区投影也有问题,分区的最小值是 200000,最大值是 3500000。当使用分区查询时,它工作正常,但没有它会给出错误:

HIVE_EXCEEDED_PARTITION_LIMIT:对表“表”的查询可能会读取超过 1000000 个分区

分区投影的 DDL:

TBLPROPERTIES (
  'projection.enabled'='true', 
  'projection.reported_qc_session_id.range'='200000, 4000000', 
  'projection.reported_qc_session_id.type'='integer', 
  'storage.location.template'='s3://bucket/table/partition=${partition}')

如何减少 hudi 阅读时间和分区投影问题?

4

0 回答 0