Class MySqlBinlogSplitReadTask
- java.lang.Object
-
- io.debezium.connector.mysql.MySqlStreamingChangeEventSource
-
- org.apache.flink.cdc.connectors.mysql.debezium.task.MySqlBinlogSplitReadTask
-
- All Implemented Interfaces:
io.debezium.pipeline.source.spi.ChangeEventSource,io.debezium.pipeline.source.spi.StreamingChangeEventSource<io.debezium.connector.mysql.MySqlPartition,io.debezium.connector.mysql.MySqlOffsetContext>
public class MySqlBinlogSplitReadTask extends MySqlStreamingChangeEventSource
Task to read all binlog for table and also supports read bounded (from lowWatermark to highWatermark) binlog.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.debezium.connector.mysql.MySqlStreamingChangeEventSource
MySqlStreamingChangeEventSource.BinlogPosition, MySqlStreamingChangeEventSource.ReaderThreadLifecycleListener
-
-
Constructor Summary
Constructors Constructor Description MySqlBinlogSplitReadTask(io.debezium.connector.mysql.MySqlConnectorConfig connectorConfig, MySqlConnection connection, EventDispatcherImpl<io.debezium.relational.TableId> dispatcher, SignalEventDispatcher signalEventDispatcher, io.debezium.pipeline.ErrorHandler errorHandler, io.debezium.util.Clock clock, io.debezium.connector.mysql.MySqlTaskContext taskContext, io.debezium.connector.mysql.MySqlStreamingChangeEventSourceMetrics metrics, MySqlBinlogSplit binlogSplit, java.util.function.Predicate<com.github.shyiko.mysql.binlog.event.Event> eventFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context, io.debezium.connector.mysql.MySqlPartition partition, io.debezium.connector.mysql.MySqlOffsetContext offsetContext)java.util.function.Predicate<com.github.shyiko.mysql.binlog.event.Event>getEventFilter()protected voidhandleEvent(io.debezium.connector.mysql.MySqlPartition partition, io.debezium.connector.mysql.MySqlOffsetContext offsetContext, com.github.shyiko.mysql.binlog.event.Event event)-
Methods inherited from class io.debezium.connector.mysql.MySqlStreamingChangeEventSource
filterGtidSet, handleDelete, handleGtidEvent, handleInsert, handleQueryEvent, handleRotateLogsEvent, handleRowsQuery, handleServerHeartbeat, handleServerIncident, handleServerStop, handleUpdate, handleUpdateTableMetadata, ignoreEvent, logEvent, onEvent, prepareTransaction, unwrapData, viewChange, wrap
-
-
-
-
Constructor Detail
-
MySqlBinlogSplitReadTask
public MySqlBinlogSplitReadTask(io.debezium.connector.mysql.MySqlConnectorConfig connectorConfig, MySqlConnection connection, EventDispatcherImpl<io.debezium.relational.TableId> dispatcher, SignalEventDispatcher signalEventDispatcher, io.debezium.pipeline.ErrorHandler errorHandler, io.debezium.util.Clock clock, io.debezium.connector.mysql.MySqlTaskContext taskContext, io.debezium.connector.mysql.MySqlStreamingChangeEventSourceMetrics metrics, MySqlBinlogSplit binlogSplit, java.util.function.Predicate<com.github.shyiko.mysql.binlog.event.Event> eventFilter)
-
-
Method Detail
-
execute
public void execute(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context, io.debezium.connector.mysql.MySqlPartition partition, io.debezium.connector.mysql.MySqlOffsetContext offsetContext) throws InterruptedException- Specified by:
executein interfaceio.debezium.pipeline.source.spi.StreamingChangeEventSource<io.debezium.connector.mysql.MySqlPartition,io.debezium.connector.mysql.MySqlOffsetContext>- Overrides:
executein classMySqlStreamingChangeEventSource- Throws:
InterruptedException
-
handleEvent
protected void handleEvent(io.debezium.connector.mysql.MySqlPartition partition, io.debezium.connector.mysql.MySqlOffsetContext offsetContext, com.github.shyiko.mysql.binlog.event.Event event)- Overrides:
handleEventin classMySqlStreamingChangeEventSource
-
getEventFilter
@VisibleForTesting public java.util.function.Predicate<com.github.shyiko.mysql.binlog.event.Event> getEventFilter()
-
-