Class 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.
    • 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:
        execute in interface io.debezium.pipeline.source.spi.StreamingChangeEventSource<io.debezium.connector.mysql.MySqlPartition,​io.debezium.connector.mysql.MySqlOffsetContext>
        Overrides:
        execute in class MySqlStreamingChangeEventSource
        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:
        handleEvent in class MySqlStreamingChangeEventSource
      • getEventFilter

        @VisibleForTesting
        public java.util.function.Predicate<com.github.shyiko.mysql.binlog.event.Event> getEventFilter()