Class BinlogSourceTask<P extends Partition,O extends OffsetContext>

java.lang.Object
org.apache.kafka.connect.source.SourceTask
io.debezium.connector.common.BaseSourceTask<P,O>
io.debezium.connector.binlog.BinlogSourceTask<P,O>
All Implemented Interfaces:
org.apache.kafka.connect.connector.Task

public abstract class BinlogSourceTask<P extends Partition,O extends OffsetContext> extends BaseSourceTask<P,O>
Abstract base class for all binlog-based source tasks.
Author:
Chris Cranford
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • BinlogSourceTask

      public BinlogSourceTask()
  • Method Details

    • validateSnapshotFeasibility

      protected boolean validateSnapshotFeasibility(io.debezium.spi.snapshot.Snapshotter snapshotter, O offsetContext, BinlogConnectorConnection connection)
      Validates the feasibility of snapshot.
      Parameters:
      snapshotter - the snapshotter, should not be null
      offsetContext - the offset context, may be null
      connection - the database connection, should not be null
      Returns:
      validates whether a snapshot can be taken
    • validateBinlogConfiguration

      protected void validateBinlogConfiguration(io.debezium.spi.snapshot.Snapshotter snapshotter, BinlogConnectorConnection connection)
      Validates the binlog configuration.
      Parameters:
      snapshotter - the snapshotter, should ont be null
      connection - the database connection, should not be null
    • resetOffset

      protected void resetOffset(BinlogConnectorConfig connectorConfig, O previousOffset, SignalProcessor<P,O> signalProcessor)
      Reset the specified offset.
      Parameters:
      connectorConfig - the connector configuration, should not be null
      previousOffset - the previous offsets
      signalProcessor - the signal processor, should not be null
    • getReadOnlyIncrementalSnapshotSignalOffset

      protected abstract Long getReadOnlyIncrementalSnapshotSignalOffset(O previousOffset)
      Obtain the read-only incremental snapshot signal offset.
      Parameters:
      previousOffset - the previous offsets
      Returns:
      the read-only incremental snapshot signal offset