Package io.debezium.connector.postgresql
Class PostgresChangeEventSourceCoordinator
- java.lang.Object
-
- io.debezium.pipeline.ChangeEventSourceCoordinator<PostgresOffsetContext>
-
- io.debezium.connector.postgresql.PostgresChangeEventSourceCoordinator
-
public class PostgresChangeEventSourceCoordinator extends ChangeEventSourceCoordinator<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(PostgresOffsetContext previousOffset, 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(PostgresOffsetContext previousOffset, ChangeEventSource.ChangeEventSourceContext context, SnapshotChangeEventSource<PostgresOffsetContext> snapshotSource)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(PostgresOffsetContext previousOffset, 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(PostgresOffsetContext previousOffset, ChangeEventSource.ChangeEventSourceContext context, SnapshotChangeEventSource<PostgresOffsetContext> snapshotSource) throws InterruptedException
- Overrides:
executeCatchUpStreamingin classChangeEventSourceCoordinator<PostgresOffsetContext>- Throws:
InterruptedException
-
setSnapshotStartLsn
private void setSnapshotStartLsn(PostgresSnapshotChangeEventSource snapshotSource, PostgresOffsetContext offsetContext) throws SQLException
- Throws:
SQLException
-
-