Package io.debezium.connector.mysql
Class MySqlSnapshotChangeEventSource
java.lang.Object
io.debezium.pipeline.source.AbstractSnapshotChangeEventSource<P,O>
io.debezium.relational.RelationalSnapshotChangeEventSource<P,O>
io.debezium.connector.binlog.BinlogSnapshotChangeEventSource<MySqlPartition,MySqlOffsetContext>
io.debezium.connector.mysql.MySqlSnapshotChangeEventSource
- All Implemented Interfaces:
ChangeEventSource,SnapshotChangeEventSource<MySqlPartition,,MySqlOffsetContext> AutoCloseable
public class MySqlSnapshotChangeEventSource
extends BinlogSnapshotChangeEventSource<MySqlPartition,MySqlOffsetContext>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.debezium.relational.RelationalSnapshotChangeEventSource
RelationalSnapshotChangeEventSource.RelationalSnapshotContext<P extends Partition,O extends OffsetContext> Nested classes/interfaces inherited from class io.debezium.pipeline.source.AbstractSnapshotChangeEventSource
AbstractSnapshotChangeEventSource.SnapshotContext<P extends Partition,O extends OffsetContext> Nested classes/interfaces inherited from interface io.debezium.pipeline.source.spi.ChangeEventSource
ChangeEventSource.ChangeEventSourceContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MySqlConnectorConfigprivate static final org.slf4j.LoggerFields inherited from class io.debezium.relational.RelationalSnapshotChangeEventSource
clock, connectionPool, dispatcher, MATCH_ALL_PATTERN, SELECT_ALL_PATTERN, snapshotterServiceFields inherited from class io.debezium.pipeline.source.AbstractSnapshotChangeEventSource
LOG_INTERVAL, notificationService -
Constructor Summary
ConstructorsConstructorDescriptionMySqlSnapshotChangeEventSource(MySqlConnectorConfig connectorConfig, MainConnectionProvidingConnectionFactory<BinlogConnectorConnection> connectionFactory, MySqlDatabaseSchema schema, EventDispatcher<MySqlPartition, TableId> dispatcher, Clock clock, MySqlSnapshotChangeEventSourceMetrics metrics, BlockingConsumer<Function<org.apache.kafka.connect.source.SourceRecord, org.apache.kafka.connect.source.SourceRecord>> lastEventProcessor, Runnable preSnapshotAction, NotificationService<MySqlPartition, MySqlOffsetContext> notificationService, SnapshotterService snapshotterService) -
Method Summary
Modifier and TypeMethodDescriptionprotected MySqlOffsetContextcopyOffset(RelationalSnapshotChangeEventSource.RelationalSnapshotContext<MySqlPartition, MySqlOffsetContext> snapshotContext) protected MySqlOffsetContextgetInitialOffsetContext(BinlogConnectorConfig connectorConfig) protected voidsetOffsetContextBinlogPositionAndGtidDetailsForSnapshot(MySqlOffsetContext offsetContext, BinlogConnectorConnection connection, SnapshotterService snapshotterService) Methods inherited from class io.debezium.connector.binlog.BinlogSnapshotChangeEventSource
createSchemaChangeEventsForTables, determineSnapshotOffset, getAllTableIds, getCreateTableEvent, getSnapshotConnectionFirstSelect, getSnapshotSelect, lockTablesForSchemaSnapshot, postSnapshot, prepare, preSnapshot, readTableStatement, readTableStructure, releaseDataSnapshotLocks, releaseSchemaSnapshotLocks, rowCountForTableMethods inherited from class io.debezium.relational.RelationalSnapshotChangeEventSource
additionalColumnFilter, connectionCreated, connectionPoolConnectionCreated, createDataEventsForTableCallable, createSnapshotConnection, doCreateDataEventsForTable, doExecute, enhanceOverriddenSelect, getBlockingSnapshottingTask, getChangeRecordEmitter, getClock, getPreparedColumnNames, getSignalDataCollectionPattern, getSnapshotSelectOverridesByTable, getSnapshotSourceTimestamp, getSnapshottingTask, getTablesForSchemaChange, lastSnapshotRecord, resultSetForDataEvents, tryStartingSnapshotMethods inherited from class io.debezium.pipeline.source.AbstractSnapshotChangeEventSource
aborted, close, completed, delaySnapshotIfNeeded, determineDataCollectionsToBeSnapshotted, execute, getDataCollectionPattern, getOffsets
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
connectorConfig
-
-
Constructor Details
-
MySqlSnapshotChangeEventSource
public MySqlSnapshotChangeEventSource(MySqlConnectorConfig connectorConfig, MainConnectionProvidingConnectionFactory<BinlogConnectorConnection> connectionFactory, MySqlDatabaseSchema schema, EventDispatcher<MySqlPartition, TableId> dispatcher, Clock clock, MySqlSnapshotChangeEventSourceMetrics metrics, BlockingConsumer<Function<org.apache.kafka.connect.source.SourceRecord, org.apache.kafka.connect.source.SourceRecord>> lastEventProcessor, Runnable preSnapshotAction, NotificationService<MySqlPartition, MySqlOffsetContext> notificationService, SnapshotterService snapshotterService)
-
-
Method Details
-
getInitialOffsetContext
- Specified by:
getInitialOffsetContextin classBinlogSnapshotChangeEventSource<MySqlPartition,MySqlOffsetContext>
-
setOffsetContextBinlogPositionAndGtidDetailsForSnapshot
protected void setOffsetContextBinlogPositionAndGtidDetailsForSnapshot(MySqlOffsetContext offsetContext, BinlogConnectorConnection connection, SnapshotterService snapshotterService) throws Exception - Specified by:
setOffsetContextBinlogPositionAndGtidDetailsForSnapshotin classBinlogSnapshotChangeEventSource<MySqlPartition,MySqlOffsetContext> - Throws:
Exception
-
copyOffset
protected MySqlOffsetContext copyOffset(RelationalSnapshotChangeEventSource.RelationalSnapshotContext<MySqlPartition, MySqlOffsetContext> snapshotContext) - Specified by:
copyOffsetin classRelationalSnapshotChangeEventSource<MySqlPartition,MySqlOffsetContext>
-