0
点赞
收藏
分享

微信扫一扫

Flink sql-cli 查询 Iceberg 的坑

花明 2022-04-02 阅读 59
flink

问题描述

sql-client 一个简单的 group by 查询 报资源不够的错 并行度默认设置为 2
在这里插入图片描述

问题分析

web界面上一看 好家伙 source直接100并行度 这肯定资源不足啊
在这里插入图片描述
读取Iceberg 走的是org.apache.iceberg.flink.source包下的FlinkSouce
源码中 BuilderinferParallelism方法中会读两个配置
在这里插入图片描述
table.exec.iceberg.infer-source-parallelism 默认为 true
Description If is false, parallelism of source are set by config. If is true, source parallelism is inferred according to splits number.
如果按默认值true的话会根据分区个数进行推断 查了下分区是超过100
table.exec.iceberg.infer-source-parallelism.max 默认为 100
Description Sets max infer parallelism for source operator.
推断设置的最大Source并行度为100 这里的设置显然会覆盖 默认并行度
在这里插入图片描述

问题解决

sql-clientSET table.exec.iceberg.infer-source-parallelism = false 禁止推断 使用默认并行度
或者 SET table.exec.iceberg.infer-source-parallelism.max = 资源允许的并行度 就不会报错了

举报

相关推荐

0 条评论