Class QueryingSnapshotter
java.lang.Object
io.debezium.connector.postgresql.snapshot.QueryingSnapshotter
- All Implemented Interfaces:
Snapshotter
- Direct Known Subclasses:
AlwaysSnapshotter,InitialOnlySnapshotter,InitialSnapshotter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildSnapshotQuery(TableId tableId, List<String> snapshotSelectColumns) Generate a valid postgres query string for the specified table, or an emptyOptionalto skip snapshotting this table (but that table will still be streamed from)voidinit(PostgresConnectorConfig config, OffsetState sourceInfo, SlotState slotState) snapshotTableLockingStatement(Duration lockTimeout, Set<TableId> tableIds) Returns a SQL statement for locking the given tables during snapshotting, if required by the specific snapshotter implementation.Return a new string that set up the transaction for snapshottingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.connector.postgresql.spi.Snapshotter
shouldSnapshot, shouldStream, shouldStreamEventsStartingFromSnapshot, snapshotCompleted
-
Constructor Details
-
QueryingSnapshotter
public QueryingSnapshotter()
-
-
Method Details
-
init
- Specified by:
initin interfaceSnapshotter
-
buildSnapshotQuery
Description copied from interface:SnapshotterGenerate a valid postgres query string for the specified table, or an emptyOptionalto skip snapshotting this table (but that table will still be streamed from)- Specified by:
buildSnapshotQueryin interfaceSnapshotter- Parameters:
tableId- the table to generate a query forsnapshotSelectColumns- the columns to be used in the snapshot select based on the column include/exclude filters- Returns:
- a valid query string, or none to skip snapshotting this table
-
snapshotTableLockingStatement
Description copied from interface:SnapshotterReturns a SQL statement for locking the given tables during snapshotting, if required by the specific snapshotter implementation.- Specified by:
snapshotTableLockingStatementin interfaceSnapshotter
-
snapshotTransactionIsolationLevelStatement
Description copied from interface:SnapshotterReturn a new string that set up the transaction for snapshotting- Specified by:
snapshotTransactionIsolationLevelStatementin interfaceSnapshotter- Parameters:
newSlotInfo- if a new slot was created for snapshotting, this contains information from the `create_replication_slot` command
-