Class LogMinerQueryResultProcessor
- java.lang.Object
-
- io.debezium.connector.oracle.logminer.LogMinerQueryResultProcessor
-
class LogMinerQueryResultProcessor extends Object
This class process entries obtained from LogMiner view. It parses each entry. On each DML it registers a callback in TransactionalBuffer. On rollback it removes registered entries from TransactionalBuffer. On commit it executes all registered callbacks, which dispatch ChangeRecords. This also calculates metrics
-
-
Field Summary
Fields Modifier and Type Field Description private Clockclockprivate OracleConnectorConfigconnectorConfigprivate ChangeEventSource.ChangeEventSourceContextcontextprivate ScncurrentOffsetCommitScnprivate ScncurrentOffsetScnprivate EventDispatcher<TableId>dispatcherprivate DmlParserdmlParserprivate HistoryRecorderhistoryRecorderprivate static org.slf4j.LoggerLOGGERprivate OracleOffsetContextoffsetContextprivate OracleDatabaseSchemaschemaprivate OracleStreamingChangeEventSourceMetricsstreamingMetricsprivate longstuckScnCounterprivate TransactionalBuffertransactionalBuffer
-
Constructor Summary
Constructors Constructor Description LogMinerQueryResultProcessor(ChangeEventSource.ChangeEventSourceContext context, OracleConnection jdbcConnection, OracleConnectorConfig connectorConfig, OracleStreamingChangeEventSourceMetrics streamingMetrics, TransactionalBuffer transactionalBuffer, OracleOffsetContext offsetContext, OracleDatabaseSchema schema, EventDispatcher<TableId> dispatcher, Clock clock, HistoryRecorder historyRecorder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private LogMinerDmlEntryparse(String redoSql, Table table, String txId)(package private) intprocessResult(ResultSet resultSet)This method does all the jobprivate static DmlParserresolveParser(OracleConnectorConfig connectorConfig, OracleConnection connection)private voidwarnStuckScn()This method is warning if a long running transaction is discovered and could be abandoned in the future.
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
context
private final ChangeEventSource.ChangeEventSourceContext context
-
streamingMetrics
private final OracleStreamingChangeEventSourceMetrics streamingMetrics
-
transactionalBuffer
private final TransactionalBuffer transactionalBuffer
-
dmlParser
private final DmlParser dmlParser
-
offsetContext
private final OracleOffsetContext offsetContext
-
schema
private final OracleDatabaseSchema schema
-
dispatcher
private final EventDispatcher<TableId> dispatcher
-
connectorConfig
private final OracleConnectorConfig connectorConfig
-
clock
private final Clock clock
-
historyRecorder
private final HistoryRecorder historyRecorder
-
currentOffsetScn
private Scn currentOffsetScn
-
currentOffsetCommitScn
private Scn currentOffsetCommitScn
-
stuckScnCounter
private long stuckScnCounter
-
-
Constructor Detail
-
LogMinerQueryResultProcessor
LogMinerQueryResultProcessor(ChangeEventSource.ChangeEventSourceContext context, OracleConnection jdbcConnection, OracleConnectorConfig connectorConfig, OracleStreamingChangeEventSourceMetrics streamingMetrics, TransactionalBuffer transactionalBuffer, OracleOffsetContext offsetContext, OracleDatabaseSchema schema, EventDispatcher<TableId> dispatcher, Clock clock, HistoryRecorder historyRecorder)
-
-
Method Detail
-
resolveParser
private static DmlParser resolveParser(OracleConnectorConfig connectorConfig, OracleConnection connection)
-
processResult
int processResult(ResultSet resultSet)
This method does all the job- Parameters:
resultSet- the info from LogMiner view- Returns:
- number of processed DMLs from the given resultSet
-
warnStuckScn
private void warnStuckScn()
This method is warning if a long running transaction is discovered and could be abandoned in the future. The criteria is the offset SCN remains the same in 25 mining cycles
-
parse
private LogMinerDmlEntry parse(String redoSql, Table table, String txId)
-
-