Closed qiunanx closed 2 years ago
default void attemptExecuteBatch(ClickHousePreparedStatement stmt, int maxRetries)
throws SQLException {
for (int i = 0; i <= maxRetries; i++) {
try {
stmt.executeBatch();
return;
} catch (Exception exception) {
LOG.error("ClickHouse executeBatch error, retry times = {}", i, exception);
if (i >= maxRetries) {
throw new SQLException(
String.format(
"Attempt to execute batch failed, exhausted retry times = %d", maxRetries), exception);
}
try {
Thread.sleep(1000L * i);
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
throw new SQLException(
"Unable to flush; interrupted while doing another attempt", ex);
}
}
}
}
@itinycheng
@v-qiunan
收到了,谢谢您,确实是个问题; 已经修改,https://github.com/itinycheng/flink-connector-clickhouse/commit/8f482dd37b973d0bfd3f5dfec1bbb715337daf65 刚提交master,晚些合并分支;
执行sql code
ClickHouseExecutor#attemptExecuteBatch
flink ui exceptions 中没有具体报错信息
从报错日志我们只能查看到重试三次,同时任务会一直内部重启,从业务角度来看,他们一般只会去看 flink ui excetion。
查看taskmanager.log
假如运行在 yarn上,作业挂了,jobmanager 日志还查看不到报错信息。