New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flink cdc postgresql 设置 'debezium.heartbeat.interval.ms' 报错 #97
Comments
@William-Kaiser PG 的 REPLICA IDENTITY 设置成 FULL 了吗? |
这个问题的原因是当开启了heartbeat以后,当满足心跳间隔时debezium会创建一个只包含offset但是没有具体record的消息,格式大概是这样: public interface ValueValidator extends Serializable {
default boolean filter(SourceRecord sourceRecord){
return false;
}
}
public final class PostgresValueValidator implements RowDataDebeziumDeserializeSchema.ValueValidator {
@Override
public boolean filter(SourceRecord sourceRecord) {
String topic = sourceRecord.topic();
if (StringUtils.isBlank(topic)) {
return false;
}
if (topic.startsWith(heartbeatPrefix)) {
return true;
}
return false;
}
} |
您好,我现在是用flink sql 创建两者表,然后join之后 通过cdc 获取变更数据,插入到es里, 2021-02-25 15:27:13,636 WARN io.debezium.connector.postgresql.PostgresStreamingChangeEventSource [] - Received 10001 events which were all filtered out, so no offset could be committed. This prevents the replication slot from acknowledging the processed WAL offsets, causing a growing backlog of non-removeable WAL segments on the database server. Consider to either adjust your filter configuration or enable heartbeat events (via the heartbeat.interval.ms option) to avoid this situation. 所以我添加设置 'debezium.heartbeat.interval.ms' = '3000',但是会错空指针错误: Caused by: java.lang.NullPointerException 我设置PG 的 REPLICA IDENTITY为FULL,还是同样的问题, |
您好,我现在是用flink sql 创建两者表,然后join之后 通过cdc 获取变更数据,插入到es里, 2021-02-25 15:27:13,636 WARN io.debezium.connector.postgresql.PostgresStreamingChangeEventSource [] - Received 10001 events which were all filtered out, so no offset could be committed. This prevents the replication slot from acknowledging the processed WAL offsets, causing a growing backlog of non-removeable WAL segments on the database server. Consider to either adjust your filter configuration or enable heartbeat events (via the heartbeat.interval.ms option) to avoid this situation. 所以我添加设置 'debezium.heartbeat.interval.ms' = '3000',但是会错空指针错误: Caused by: java.lang.NullPointerException 我设置PG 的 REPLICA IDENTITY为FULL,还是同样的问题, |
1.2版本已经修复了你下载1.2的依赖包再运行试试 |
please try cdc version which is bigger than 1.2 |
Flink 1.11.0
postgresql12
设置 'debezium.heartbeat.interval.ms' = '30000' 报错
Caused by: java.lang.NullPointerException
at com.alibaba.ververica.cdc.debezium.table.RowDataDebeziumDeserializeSchema.extractBeforeRow(RowDataDebeziumDeserializeSchema.java:130) ~[flink-sql-connector-postgres-cdc-1.1.0.jar:1.1.0]
at com.alibaba.ververica.cdc.debezium.table.RowDataDebeziumDeserializeSchema.deserialize(RowDataDebeziumDeserializeSchema.java:111) ~[flink-sql-connector-postgres-cdc-1.1.0.jar:1.1.0]
at com.alibaba.ververica.cdc.debezium.internal.DebeziumChangeConsumer.handleBatch(DebeziumChangeConsumer.java:97) ~[flink-sql-connector-postgres-cdc-1.1.0.jar:1.1.0]
at io.debezium.embedded.ConvertingEngineBuilder.lambda$notifying$2(ConvertingEngineBuilder.java:81) ~[flink-sql-connector-postgres-cdc-1.1.0.jar:1.1.0]
at io.debezium.embedded.EmbeddedEngine.run(EmbeddedEngine.java:812) ~[flink-sql-connector-postgres-cdc-1.1.0.jar:1.1.0]
at io.debezium.embedded.ConvertingEngineBuilder$2.run(ConvertingEngineBuilder.java:170) ~[flink-sql-connector-postgres-cdc-1.1.0.jar:1.1.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_202]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_202]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_202]
The text was updated successfully, but these errors were encountered: