public class SqlServerStreamingChangeEventSource extends Object implements io.debezium.pipeline.source.spi.StreamingChangeEventSource
StreamingChangeEventSource based on SQL Server change data capture functionality.
A main polls database DDL change and change data tables and turns them into change events.| Modifier and Type | Class and Description |
|---|---|
private static class |
SqlServerStreamingChangeEventSource.ChangeTablePointer
The logical representation of a position for the change in the transaction log.
|
| Modifier and Type | Field and Description |
|---|---|
private io.debezium.util.Clock |
clock |
private static int |
COL_COMMIT_LSN |
private static int |
COL_DATA |
private static int |
COL_OPERATION |
private static int |
COL_ROW_LSN |
private SqlServerConnection |
connection |
private SqlServerConnectorConfig |
connectorConfig |
private io.debezium.pipeline.EventDispatcher<io.debezium.relational.TableId> |
dispatcher |
private io.debezium.pipeline.ErrorHandler |
errorHandler |
private static org.slf4j.Logger |
LOGGER |
private static Pattern |
MISSING_CDC_FUNCTION_CHANGES_ERROR |
private SqlServerOffsetContext |
offsetContext |
private Duration |
pollInterval |
private SqlServerDatabaseSchema |
schema |
| Constructor and Description |
|---|
SqlServerStreamingChangeEventSource(SqlServerConnectorConfig connectorConfig,
SqlServerOffsetContext offsetContext,
SqlServerConnection connection,
io.debezium.pipeline.EventDispatcher<io.debezium.relational.TableId> dispatcher,
io.debezium.pipeline.ErrorHandler errorHandler,
io.debezium.util.Clock clock,
SqlServerDatabaseSchema schema) |
| Modifier and Type | Method and Description |
|---|---|
void |
commitOffset(Map<String,?> offset) |
void |
execute(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context) |
private ChangeTable[] |
getCdcTablesToQuery() |
private void |
migrateTable(Queue<ChangeTable> schemaChangeCheckpoints) |
private ChangeTable[] |
processErrorFromChangeTableQuery(SQLException exception,
ChangeTable[] currentChangeTables) |
private static final int COL_COMMIT_LSN
private static final int COL_ROW_LSN
private static final int COL_OPERATION
private static final int COL_DATA
private static final Pattern MISSING_CDC_FUNCTION_CHANGES_ERROR
private static final org.slf4j.Logger LOGGER
private final SqlServerConnection connection
private final io.debezium.pipeline.EventDispatcher<io.debezium.relational.TableId> dispatcher
private final io.debezium.pipeline.ErrorHandler errorHandler
private final io.debezium.util.Clock clock
private final SqlServerDatabaseSchema schema
private final SqlServerOffsetContext offsetContext
private final Duration pollInterval
private final SqlServerConnectorConfig connectorConfig
public SqlServerStreamingChangeEventSource(SqlServerConnectorConfig connectorConfig, SqlServerOffsetContext offsetContext, SqlServerConnection connection, io.debezium.pipeline.EventDispatcher<io.debezium.relational.TableId> dispatcher, io.debezium.pipeline.ErrorHandler errorHandler, io.debezium.util.Clock clock, SqlServerDatabaseSchema schema)
public void execute(io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext context)
throws InterruptedException
execute in interface io.debezium.pipeline.source.spi.StreamingChangeEventSourceInterruptedExceptionprivate void migrateTable(Queue<ChangeTable> schemaChangeCheckpoints) throws InterruptedException, SQLException
InterruptedExceptionSQLExceptionprivate ChangeTable[] processErrorFromChangeTableQuery(SQLException exception, ChangeTable[] currentChangeTables) throws Exception
Exceptionprivate ChangeTable[] getCdcTablesToQuery() throws SQLException, InterruptedException
SQLExceptionInterruptedExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.