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 more
ChangeEventSources and executes them in order. Extends the base
ChangeEventSourceCoordinator to support a pre-snapshot catch up streaming phase.-
Nested Class Summary
Nested classes/interfaces inherited from class io.debezium.pipeline.ChangeEventSourceCoordinator
ChangeEventSourceCoordinator.CatchUpStreamingResult, ChangeEventSourceCoordinator.ChangeEventSourceContextImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate final SlotStateprivate final SnapshotterServiceFields inherited from class io.debezium.pipeline.ChangeEventSourceCoordinator
changeEventSourceFactory, changeEventSourceMetricsFactory, commitOffsetLock, connectorConfig, errorHandler, eventDispatcher, executor, notificationService, previousOffsets, schema, SHUTDOWN_WAIT_TIMEOUT, signalProcessor, snapshotMetrics, streamingMetrics, streamingSource -
Constructor Summary
ConstructorsConstructorDescriptionPostgresChangeEventSourceCoordinator(Offsets<PostgresPartition, PostgresOffsetContext> previousOffsets, ErrorHandler errorHandler, Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorType, CommonConnectorConfig connectorConfig, PostgresChangeEventSourceFactory changeEventSourceFactory, ChangeEventSourceMetricsFactory<PostgresPartition> changeEventSourceMetricsFactory, EventDispatcher<PostgresPartition, ?> eventDispatcher, DatabaseSchema<?> schema, SnapshotterService snapshotterService, SlotState slotInfo, SignalProcessor<PostgresPartition, PostgresOffsetContext> signalProcessor, NotificationService<PostgresPartition, PostgresOffsetContext> notificationService) -
Method Summary
Modifier and TypeMethodDescriptionprotected ChangeEventSourceCoordinator<PostgresPartition,PostgresOffsetContext>.CatchUpStreamingResult executeCatchUpStreaming(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, doBlockingSnapshot, doSnapshot, doSnapshot, executeChangeEventSources, getErrorHandler, getSignalProcessor, initStreamEvents, registerSignalActionsAndStartProcessor, start, stop, streamEvents, streamingConnected
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
snapshotterService
-
slotInfo
-
-
Constructor Details
-
PostgresChangeEventSourceCoordinator
public PostgresChangeEventSourceCoordinator(Offsets<PostgresPartition, PostgresOffsetContext> previousOffsets, ErrorHandler errorHandler, Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorType, CommonConnectorConfig connectorConfig, PostgresChangeEventSourceFactory changeEventSourceFactory, ChangeEventSourceMetricsFactory<PostgresPartition> changeEventSourceMetricsFactory, EventDispatcher<PostgresPartition, ?> eventDispatcher, DatabaseSchema<?> schema, SnapshotterService snapshotterService, SlotState slotInfo, SignalProcessor<PostgresPartition, PostgresOffsetContext> signalProcessor, NotificationService<PostgresPartition, PostgresOffsetContext> notificationService)
-
-
Method Details
-
executeCatchUpStreaming
protected ChangeEventSourceCoordinator<PostgresPartition,PostgresOffsetContext>.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
-