T - The type of elements produced by the handler.@Internal public class DebeziumChangeFetcher<T> extends Object
DebeziumEngine to data in Flink. Considering
Debezium in different mode has different strategies to hold the lock, e.g. snapshot, the handler
also needs different strategy. In snapshot phase, the handler needs to hold the lock until the
snapshot finishes. But in non-snapshot phase, the handler only needs to hold the lock when
emitting the records.| 构造器和说明 |
|---|
DebeziumChangeFetcher(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T> sourceContext,
DebeziumDeserializationSchema<T> deserialization,
boolean isInDbSnapshotPhase,
String heartbeatTopicPrefix,
Handover handover) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
long |
getEmitDelay()
The metric indicates delay from data generation to leaving the source operator.
|
long |
getFetchDelay()
The metric indicates delay from data generation to entry into the system.
|
long |
getIdleTime() |
long |
getNumRecordInErrors() |
void |
runFetchLoop()
Process change messages from the
Handover and collect the processed messages by
Collector. |
byte[] |
snapshotCurrentState()
Take a snapshot of the Debezium handler state.
|
public DebeziumChangeFetcher(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T> sourceContext, DebeziumDeserializationSchema<T> deserialization, boolean isInDbSnapshotPhase, String heartbeatTopicPrefix, Handover handover)
public byte[] snapshotCurrentState()
throws Exception
Important: This method must be called under the checkpoint lock.
Exceptionpublic void runFetchLoop()
throws Exception
Handover and collect the processed messages by
Collector.Exceptionpublic void close()
public long getFetchDelay()
Note: the metric is available during the binlog phase. Use 0 to indicate the metric is unavailable.
public long getEmitDelay()
Note: the metric is available during the binlog phase. Use 0 to indicate the metric is unavailable.
public long getIdleTime()
public long getNumRecordInErrors()
Copyright © 2025 The Apache Software Foundation. All rights reserved.