【发布时间】:2021-06-17 06:04:52
【问题描述】:
目前,我们在 flink 作业中遇到一些性能问题,使用 jdbc 以每小时将大约 100 万条数据插入 到 Kudu 表使用 impala jdbc。
我们已经尝试增加参数
JdbcExecutionOptions.builder()
.withBatchSize(1000)
.withBatchIntervalMs(200)
.withMaxRetries(3)
.build()
检查点间隔为 10 秒,检查点超时为 10 分钟,但没有结果。 我们还尝试将并行度从 3 增加到 6,但也不起作用。
我们也尝试将 BatchSize 增加到 10000,但我们遇到了错误
org.apache.flink.connector.jdbc.internal.JdbcBatchingOutputFormat [] - JDBC executeBatch error, retry times = 0
java.sql.SQLException: [Cloudera][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:AnalysisException: Exceeded the statement exp
ression limit (250000)
Statement has 720000 expressions.
我们能得到的最好结果是 1500 条记录/分钟,参数为
JdbcExecutionOptions.builder()
.withBatchSize(200)
.withBatchIntervalMs(50)
.withMaxRetries(3)
.build()
检查点间隔 3 秒,检查点超时 10 分钟。
我们可以使用其他参数来获得更好的这种情况吗?
谢谢,
【问题讨论】:
标签: jdbc apache-flink impala