Package io.debezium.connector.spanner
Class SpannerStreamingChangeEventSource
java.lang.Object
io.debezium.connector.spanner.SpannerStreamingChangeEventSource
- All Implemented Interfaces:
CommittingRecordsStreamingChangeEventSource<SpannerPartition,,SpannerOffsetContext> io.debezium.pipeline.source.spi.ChangeEventSource,io.debezium.pipeline.source.spi.StreamingChangeEventSource<SpannerPartition,SpannerOffsetContext>
public class SpannerStreamingChangeEventSource
extends Object
implements CommittingRecordsStreamingChangeEventSource<SpannerPartition,SpannerOffsetContext>
Processes all types of Spanner Stream Events
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.pipeline.source.spi.ChangeEventSource
io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SpannerConnectorConfigprivate final io.debezium.pipeline.ErrorHandlerprivate final StreamEventQueueprivate static final Durationprivate final FinishingPartitionManagerprivate final FinishPartitionStrategyprivate final FinishPartitionWatchDogprivate static final org.slf4j.Loggerprivate final MetricsEventPublisherprivate final SpannerOffsetContextFactoryprivate final PartitionManagerprivate final SchemaRegistryprivate final SpannerEventDispatcherprivate final ChangeStreamprivate static final StuckPartitionStrategyprivate Thread -
Constructor Summary
ConstructorsConstructorDescriptionSpannerStreamingChangeEventSource(SpannerConnectorConfig connectorConfig, io.debezium.pipeline.ErrorHandler errorHandler, ChangeStream stream, StreamEventQueue eventQueue, MetricsEventPublisher metricsEventPublisher, PartitionManager partitionManager, SchemaRegistry schemaRegistry, SpannerEventDispatcher spannerEventDispatcher, boolean finishingAfterCommit, SpannerOffsetContextFactory offsetContextFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidcommitRecords(List<org.apache.kafka.connect.source.SourceRecord> records) voidexecute(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context, SpannerPartition partition, SpannerOffsetContext offsetContext) private void(package private) voidprivate voidprivate voidprivate voidstartProcessing(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.pipeline.source.spi.StreamingChangeEventSource
commitOffset, executeIteration, init
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
STUCK_PARTITION_STRATEGY
-
FINISHING_PARTITION_TIMEOUT
-
finishPartitionStrategy
-
errorHandler
private final io.debezium.pipeline.ErrorHandler errorHandler -
eventQueue
-
metricsEventPublisher
-
stream
-
partitionManager
-
schemaRegistry
-
spannerEventDispatcher
-
finishingPartitionManager
-
finishPartitionWatchDog
-
offsetContextFactory
-
connectorConfig
-
thread
-
-
Constructor Details
-
SpannerStreamingChangeEventSource
public SpannerStreamingChangeEventSource(SpannerConnectorConfig connectorConfig, io.debezium.pipeline.ErrorHandler errorHandler, ChangeStream stream, StreamEventQueue eventQueue, MetricsEventPublisher metricsEventPublisher, PartitionManager partitionManager, SchemaRegistry schemaRegistry, SpannerEventDispatcher spannerEventDispatcher, boolean finishingAfterCommit, SpannerOffsetContextFactory offsetContextFactory)
-
-
Method Details
-
execute
public void execute(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context, SpannerPartition partition, SpannerOffsetContext offsetContext) throws InterruptedException - Specified by:
executein interfaceio.debezium.pipeline.source.spi.StreamingChangeEventSource<SpannerPartition,SpannerOffsetContext> - Throws:
InterruptedException
-
startProcessing
private void startProcessing(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context) -
processDataChangeEvent
- Throws:
InterruptedException
-
processHeartBeatEvent
- Throws:
InterruptedException
-
processChildPartitionsEvent
- Throws:
InterruptedException
-
processFailure
-
commitRecords
public void commitRecords(List<org.apache.kafka.connect.source.SourceRecord> records) throws InterruptedException - Specified by:
commitRecordsin interfaceCommittingRecordsStreamingChangeEventSource<SpannerPartition,SpannerOffsetContext> - Throws:
InterruptedException
-