Class SignalBasedIncrementalSnapshotChangeEventSource<P extends Partition,T extends io.debezium.spi.schema.DataCollectionId>
java.lang.Object
io.debezium.pipeline.source.snapshot.incremental.AbstractIncrementalSnapshotChangeEventSource<P,T>
io.debezium.pipeline.source.snapshot.incremental.SignalBasedIncrementalSnapshotChangeEventSource<P,T>
- All Implemented Interfaces:
IncrementalSnapshotChangeEventSource<P,T>
@NotThreadSafe
public class SignalBasedIncrementalSnapshotChangeEventSource<P extends Partition,T extends io.debezium.spi.schema.DataCollectionId>
extends AbstractIncrementalSnapshotChangeEventSource<P,T>
-
Field Summary
FieldsFields inherited from class io.debezium.pipeline.source.snapshot.incremental.AbstractIncrementalSnapshotChangeEventSource
chunkQueryBuilder, connectorConfig, context, dispatcher, jdbcConnection, notificationService, window -
Constructor Summary
ConstructorsConstructorDescriptionSignalBasedIncrementalSnapshotChangeEventSource(RelationalDatabaseConnectorConfig config, JdbcConnection jdbcConnection, EventDispatcher<P, T> dispatcher, DatabaseSchema<?> databaseSchema, io.debezium.util.Clock clock, SnapshotProgressListener<P> progressListener, DataChangeEventListener<P> dataChangeEventListener, NotificationService<P, ? extends OffsetContext> notificationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidemitWindowClose(P partition, OffsetContext offsetContext) Update high watermark for the incremental snapshot chunkprotected voidemitWindowOpen(P partition, OffsetContext offsetContext) Update low watermark for the incremental snapshot chunkprotected StringgetDatabaseNameFromPartition(Partition partition) Extract the database name from a partition.protected StringgetSignalTableNameForPartition(Partition partition) Get the appropriate signal table name for the given partition.private WatermarkWindowClosergetWatermarkWindowCloser(CommonConnectorConfig connectorConfig, JdbcConnection jdbcConnection, String signalTable) voidprocessMessage(Partition partition, io.debezium.spi.schema.DataCollectionId dataCollectionId, Object key, OffsetContext offsetContext) Methods inherited from class io.debezium.pipeline.source.snapshot.incremental.AbstractIncrementalSnapshotChangeEventSource
addDataCollectionNamesToSnapshot, closeWindow, createAndDispatchSchemaChangeEvent, deduplicateWindow, getChangeRecordEmitter, getDatabaseName, getSignalTableName, getTableDDL, init, pauseSnapshot, postIncrementalSnapshotCompleted, postReadChunk, preIncrementalSnapshotStart, preReadChunk, processSchemaChange, readChunk, readSchemaForTable, refreshTableSchema, requestStopSnapshot, rereadChunk, resumeSnapshot, sendEvent, sendWindowEvents, setContext, validateSignalTableConfigurationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotChangeEventSource
processFilteredEvent, processHeartbeat, processTransactionCommittedEvent, processTransactionStartedEvent
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
signalMetadata
-
-
Constructor Details
-
SignalBasedIncrementalSnapshotChangeEventSource
public SignalBasedIncrementalSnapshotChangeEventSource(RelationalDatabaseConnectorConfig config, JdbcConnection jdbcConnection, EventDispatcher<P, T> dispatcher, DatabaseSchema<?> databaseSchema, io.debezium.util.Clock clock, SnapshotProgressListener<P> progressListener, DataChangeEventListener<P> dataChangeEventListener, NotificationService<P, ? extends OffsetContext> notificationService)
-
-
Method Details
-
getSignalTableNameForPartition
Get the appropriate signal table name for the given partition. For multi-database connectors with multiple signal tables, this method matches the signal table to the database of the partition.- Parameters:
partition- the partition for which to get the signal table- Returns:
- the signal table name, or null if not configured
-
getDatabaseNameFromPartition
Extract the database name from a partition. Default implementation tries to use AbstractPartition's databaseName field via reflection. Subclasses should override this for connector-specific partition types.- Parameters:
partition- the partition- Returns:
- the database name, or null if it cannot be determined
-
processMessage
public void processMessage(Partition partition, io.debezium.spi.schema.DataCollectionId dataCollectionId, Object key, OffsetContext offsetContext) -
emitWindowOpen
Description copied from class:AbstractIncrementalSnapshotChangeEventSourceUpdate low watermark for the incremental snapshot chunk- Specified by:
emitWindowOpenin classAbstractIncrementalSnapshotChangeEventSource<P extends Partition,T extends io.debezium.spi.schema.DataCollectionId> - Throws:
SQLException
-
emitWindowClose
Description copied from class:AbstractIncrementalSnapshotChangeEventSourceUpdate high watermark for the incremental snapshot chunk- Specified by:
emitWindowClosein classAbstractIncrementalSnapshotChangeEventSource<P extends Partition,T extends io.debezium.spi.schema.DataCollectionId> - Throws:
Exception
-
getWatermarkWindowCloser
private WatermarkWindowCloser getWatermarkWindowCloser(CommonConnectorConfig connectorConfig, JdbcConnection jdbcConnection, String signalTable)
-