Package io.debezium.connector.postgresql
Class PostgresChangeEventSourceCoordinator
- java.lang.Object
-
- io.debezium.pipeline.ChangeEventSourceCoordinator<PostgresPartition,PostgresOffsetContext>
-
- io.debezium.connector.postgresql.PostgresChangeEventSourceCoordinator
-
public class PostgresChangeEventSourceCoordinator extends ChangeEventSourceCoordinator<PostgresPartition,PostgresOffsetContext>
Coordinates one or moreChangeEventSources and executes them in order. Extends the baseChangeEventSourceCoordinatorto support a pre-snapshot catch up streaming phase.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.debezium.pipeline.ChangeEventSourceCoordinator
ChangeEventSourceCoordinator.CatchUpStreamingResult
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGGERprivate SlotStateslotInfoprivate Snapshottersnapshotter-
Fields inherited from class io.debezium.pipeline.ChangeEventSourceCoordinator
SHUTDOWN_WAIT_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description PostgresChangeEventSourceCoordinator(Offsets<PostgresPartition,PostgresOffsetContext> previousOffsets, ErrorHandler errorHandler, Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorType, CommonConnectorConfig connectorConfig, PostgresChangeEventSourceFactory changeEventSourceFactory, ChangeEventSourceMetricsFactory changeEventSourceMetricsFactory, EventDispatcher<?> eventDispatcher, DatabaseSchema<?> schema, Snapshotter snapshotter, SlotState slotInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ChangeEventSourceCoordinator.CatchUpStreamingResultexecuteCatchUpStreaming(ChangeEventSource.ChangeEventSourceContext context, SnapshotChangeEventSource<PostgresPartition,PostgresOffsetContext> snapshotSource, PostgresPartition partition, PostgresOffsetContext previousOffset)private voidsetSnapshotStartLsn(PostgresSnapshotChangeEventSource snapshotSource, PostgresOffsetContext offsetContext)-
Methods inherited from class io.debezium.pipeline.ChangeEventSourceCoordinator
commitOffset, start, stop, streamEvents
-
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
snapshotter
private final Snapshotter snapshotter
-
slotInfo
private final SlotState slotInfo
-
-
Constructor Detail
-
PostgresChangeEventSourceCoordinator
public PostgresChangeEventSourceCoordinator(Offsets<PostgresPartition,PostgresOffsetContext> previousOffsets, ErrorHandler errorHandler, Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorType, CommonConnectorConfig connectorConfig, PostgresChangeEventSourceFactory changeEventSourceFactory, ChangeEventSourceMetricsFactory changeEventSourceMetricsFactory, EventDispatcher<?> eventDispatcher, DatabaseSchema<?> schema, Snapshotter snapshotter, SlotState slotInfo)
-
-
Method Detail
-
executeCatchUpStreaming
protected ChangeEventSourceCoordinator.CatchUpStreamingResult executeCatchUpStreaming(ChangeEventSource.ChangeEventSourceContext context, SnapshotChangeEventSource<PostgresPartition,PostgresOffsetContext> snapshotSource, PostgresPartition partition, PostgresOffsetContext previousOffset) throws InterruptedException
- Overrides:
executeCatchUpStreamingin classChangeEventSourceCoordinator<PostgresPartition,PostgresOffsetContext>- Throws:
InterruptedException
-
setSnapshotStartLsn
private void setSnapshotStartLsn(PostgresSnapshotChangeEventSource snapshotSource, PostgresOffsetContext offsetContext) throws SQLException
- Throws:
SQLException
-
-