Package io.debezium.connector.oracle
Class OracleStreamingChangeEventSourceMetrics
- java.lang.Object
-
- io.debezium.metrics.Metrics
-
- io.debezium.pipeline.metrics.PipelineMetrics
-
- io.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics
-
- io.debezium.connector.oracle.OracleStreamingChangeEventSourceMetrics
-
- All Implemented Interfaces:
OracleStreamingChangeEventSourceMetricsMXBean,ChangeEventSourceMetricsMXBean,StreamingChangeEventSourceMetrics,StreamingChangeEventSourceMetricsMXBean,DataChangeEventListener,StreamingProgressListener
@ThreadSafe public class OracleStreamingChangeEventSourceMetrics extends DefaultStreamingChangeEventSourceMetrics implements OracleStreamingChangeEventSourceMetricsMXBean
The metrics implementation for Oracle connector streaming phase.
-
-
Field Summary
-
Fields inherited from class io.debezium.pipeline.metrics.PipelineMetrics
lastEventTimestamp, metadataProvider, numberOfErroneousEvents, taskContext, totalNumberOfCreateEventsSeen, totalNumberOfDeleteEventsSeen, totalNumberOfEventsSeen, totalNumberOfUpdateEventsSeen
-
Fields inherited from interface io.debezium.pipeline.source.spi.DataChangeEventListener
NO_OP
-
-
Constructor Summary
Constructors Constructor Description OracleStreamingChangeEventSourceMetrics(CdcSourceTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig)OracleStreamingChangeEventSourceMetrics(CdcSourceTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig, Clock clock)Constructor that allows providing a clock to be used for Tests.
-
Method Summary
-
Methods inherited from class io.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics
connected, getCapturedTables, getLastTransactionId, getMilliSecondsBehindSource, getMonitoredTables, getSourceEventPosition, isConnected, onConnectorEvent, onEvent
-
Methods inherited from class io.debezium.pipeline.metrics.PipelineMetrics
getCurrentQueueSizeInBytes, getLastEvent, getMaxQueueSizeInBytes, getMilliSecondsSinceLastEvent, getNumberOfErroneousEvents, getNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacity, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfEventsSeen, getTotalNumberOfUpdateEventsSeen, onErroneousEvent, onErroneousEvent, onFilteredEvent, onFilteredEvent
-
Methods inherited from class io.debezium.metrics.Metrics
metricName, register, unregister
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.debezium.pipeline.metrics.ChangeEventSourceMetricsMXBean
getCapturedTables, getCurrentQueueSizeInBytes, getLastEvent, getMaxQueueSizeInBytes, getMilliSecondsSinceLastEvent, getMonitoredTables, getNumberOfErroneousEvents, getNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacity, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfEventsSeen, getTotalNumberOfUpdateEventsSeen
-
Methods inherited from interface io.debezium.pipeline.source.spi.DataChangeEventListener
onErroneousEvent, onErroneousEvent, onFilteredEvent, onFilteredEvent
-
Methods inherited from interface io.debezium.pipeline.metrics.StreamingChangeEventSourceMetricsMXBean
getLastTransactionId, getMilliSecondsBehindSource, getSourceEventPosition, isConnected
-
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
MILLIS_PER_SECOND
private static final long MILLIS_PER_SECOND
- See Also:
- Constant Field Values
-
currentScn
private final AtomicReference<Scn> currentScn
-
logMinerQueryCount
private final AtomicInteger logMinerQueryCount
-
totalCapturedDmlCount
private final AtomicInteger totalCapturedDmlCount
-
totalDurationOfFetchingQuery
private final AtomicReference<Duration> totalDurationOfFetchingQuery
-
lastCapturedDmlCount
private final AtomicInteger lastCapturedDmlCount
-
lastDurationOfFetchingQuery
private final AtomicReference<Duration> lastDurationOfFetchingQuery
-
maxCapturedDmlCount
private final AtomicLong maxCapturedDmlCount
-
totalProcessedRows
private final AtomicLong totalProcessedRows
-
maxDurationOfFetchingQuery
private final AtomicReference<Duration> maxDurationOfFetchingQuery
-
totalBatchProcessingDuration
private final AtomicReference<Duration> totalBatchProcessingDuration
-
lastBatchProcessingDuration
private final AtomicReference<Duration> lastBatchProcessingDuration
-
totalParseTime
private final AtomicReference<Duration> totalParseTime
-
totalStartLogMiningSessionDuration
private final AtomicReference<Duration> totalStartLogMiningSessionDuration
-
lastStartLogMiningSessionDuration
private final AtomicReference<Duration> lastStartLogMiningSessionDuration
-
maxStartingLogMiningSessionDuration
private final AtomicReference<Duration> maxStartingLogMiningSessionDuration
-
totalProcessingTime
private final AtomicReference<Duration> totalProcessingTime
-
minBatchProcessingTime
private final AtomicReference<Duration> minBatchProcessingTime
-
maxBatchProcessingTime
private final AtomicReference<Duration> maxBatchProcessingTime
-
totalResultSetNextTime
private final AtomicReference<Duration> totalResultSetNextTime
-
maxBatchProcessingThroughput
private final AtomicLong maxBatchProcessingThroughput
-
currentLogFileName
private final AtomicReference<String[]> currentLogFileName
-
redoLogStatus
private final AtomicReference<String[]> redoLogStatus
-
minimumLogsMined
private final AtomicLong minimumLogsMined
-
maximumLogsMined
private final AtomicLong maximumLogsMined
-
switchCounter
private final AtomicInteger switchCounter
-
batchSize
private final AtomicInteger batchSize
-
millisecondToSleepBetweenMiningQuery
private final AtomicLong millisecondToSleepBetweenMiningQuery
-
hoursToKeepTransaction
private final AtomicInteger hoursToKeepTransaction
-
networkConnectionProblemsCounter
private final AtomicLong networkConnectionProblemsCounter
-
lagFromTheSourceDuration
private final AtomicReference<Duration> lagFromTheSourceDuration
-
minLagFromTheSourceDuration
private final AtomicReference<Duration> minLagFromTheSourceDuration
-
maxLagFromTheSourceDuration
private final AtomicReference<Duration> maxLagFromTheSourceDuration
-
lastCommitDuration
private final AtomicReference<Duration> lastCommitDuration
-
maxCommitDuration
private final AtomicReference<Duration> maxCommitDuration
-
activeTransactions
private final AtomicLong activeTransactions
-
rolledBackTransactions
private final AtomicLong rolledBackTransactions
-
committedTransactions
private final AtomicLong committedTransactions
-
abandonedTransactionIds
private final AtomicReference<Set<String>> abandonedTransactionIds
-
rolledBackTransactionIds
private final AtomicReference<Set<String>> rolledBackTransactionIds
-
registeredDmlCount
private final AtomicLong registeredDmlCount
-
committedDmlCount
private final AtomicLong committedDmlCount
-
errorCount
private final AtomicInteger errorCount
-
warningCount
private final AtomicInteger warningCount
-
scnFreezeCount
private final AtomicInteger scnFreezeCount
-
timeDifference
private final AtomicLong timeDifference
-
offsetSeconds
private final AtomicInteger offsetSeconds
-
oldestScn
private final AtomicReference<Scn> oldestScn
-
committedScn
private final AtomicReference<Scn> committedScn
-
offsetScn
private final AtomicReference<Scn> offsetScn
-
unparsableDdlCount
private final AtomicInteger unparsableDdlCount
-
miningSessionUserGlobalAreaMemory
private final AtomicLong miningSessionUserGlobalAreaMemory
-
miningSessionUserGlobalAreaMaxMemory
private final AtomicLong miningSessionUserGlobalAreaMaxMemory
-
miningSessionProcessGlobalAreaMemory
private final AtomicLong miningSessionProcessGlobalAreaMemory
-
miningSessionProcessGlobalAreaMaxMemory
private final AtomicLong miningSessionProcessGlobalAreaMaxMemory
-
batchSizeMin
private final int batchSizeMin
-
batchSizeMax
private final int batchSizeMax
-
batchSizeDefault
private final int batchSizeDefault
-
sleepTimeMin
private final long sleepTimeMin
-
sleepTimeMax
private final long sleepTimeMax
-
sleepTimeDefault
private final long sleepTimeDefault
-
sleepTimeIncrement
private final long sleepTimeIncrement
-
startTime
private final Instant startTime
-
clock
private final Clock clock
-
-
Constructor Detail
-
OracleStreamingChangeEventSourceMetrics
public OracleStreamingChangeEventSourceMetrics(CdcSourceTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig)
-
OracleStreamingChangeEventSourceMetrics
@VisibleForTesting OracleStreamingChangeEventSourceMetrics(CdcSourceTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig, Clock clock)
Constructor that allows providing a clock to be used for Tests.
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanResets metrics.- Specified by:
resetin interfaceChangeEventSourceMetricsMXBean- Specified by:
resetin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Overrides:
resetin classDefaultStreamingChangeEventSourceMetrics
-
setCurrentScn
public void setCurrentScn(Scn scn)
-
getMinimumMinedLogCount
public long getMinimumMinedLogCount()
- Specified by:
getMinimumMinedLogCountin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the minimum number of logs used by a mining session
-
getMaximumMinedLogCount
public long getMaximumMinedLogCount()
- Specified by:
getMaximumMinedLogCountin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the maximum number of logs used by a mining session
-
setSwitchCount
public void setSwitchCount(int counter)
-
setLastCapturedDmlCount
public void setLastCapturedDmlCount(int dmlCount)
-
setLastDurationOfBatchCapturing
public void setLastDurationOfBatchCapturing(Duration lastDuration)
-
setLastDurationOfBatchProcessing
public void setLastDurationOfBatchProcessing(Duration lastDuration)
-
incrementNetworkConnectionProblemsCounter
public void incrementNetworkConnectionProblemsCounter()
-
getCurrentScn
public String getCurrentScn()
- Specified by:
getCurrentScnin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the current system change number of the database
-
getTotalCapturedDmlCount
public long getTotalCapturedDmlCount()
- Specified by:
getTotalCapturedDmlCountin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- number of captured DML since the connector is up
-
getCurrentRedoLogFileName
public String[] getCurrentRedoLogFileName()
- Specified by:
getCurrentRedoLogFileNamein interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- array of current filenames to be used by the mining session.
-
getRedoLogStatus
public String[] getRedoLogStatus()
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanExposes states of redo logs: current, active, inactive, unused ...- Specified by:
getRedoLogStatusin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- array of: (redo log name | status) elements
-
getSwitchCounter
public int getSwitchCounter()
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanfetches counter of redo switches for the last day. If this number is high , like once in 3 minutes, the troubleshooting on the database level is required.- Specified by:
getSwitchCounterin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- counter
-
getLastDurationOfFetchQueryInMilliseconds
public Long getLastDurationOfFetchQueryInMilliseconds()
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanLogMiner view query returns number of captured DML , Commit and Rollback. This is what we call a batch.- Specified by:
getLastDurationOfFetchQueryInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- duration of the last batch fetching
-
getLastBatchProcessingTimeInMilliseconds
public long getLastBatchProcessingTimeInMilliseconds()
- Specified by:
getLastBatchProcessingTimeInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- time of processing the last captured batch
-
getMaxDurationOfFetchQueryInMilliseconds
public Long getMaxDurationOfFetchQueryInMilliseconds()
- Specified by:
getMaxDurationOfFetchQueryInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- average duration of LogMiner view query
-
getMaxCapturedDmlInBatch
public Long getMaxCapturedDmlInBatch()
- Specified by:
getMaxCapturedDmlInBatchin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- max number of DML captured during connector start time
-
getLastCapturedDmlCount
public int getLastCapturedDmlCount()
- Specified by:
getLastCapturedDmlCountin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- number of captured DL during last mining session
-
getTotalProcessedRows
public long getTotalProcessedRows()
- Specified by:
getTotalProcessedRowsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the total number of log miner rows processed.
-
getTotalResultSetNextTimeInMilliseconds
public long getTotalResultSetNextTimeInMilliseconds()
- Specified by:
getTotalResultSetNextTimeInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the total number of milliseconds spent iterating log miner results calling next.
-
getAverageBatchProcessingThroughput
public long getAverageBatchProcessingThroughput()
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanThis represents the average number of entries processed per second from LogMiner sessions. Entries include things such as DMLs, commits, rollbacks, etc.- Specified by:
getAverageBatchProcessingThroughputin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the average number of entries per second from LogMiner sessions
-
getLastBatchProcessingThroughput
public long getLastBatchProcessingThroughput()
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanThis represents the number of entries processed per second in the last LogMiner session. Entries include things such as DMLs, commits, rollbacks, etc.- Specified by:
getLastBatchProcessingThroughputin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the number of entries processed per second from last LogMiner session
-
getFetchingQueryCount
public long getFetchingQueryCount()
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanLogMiner view query returns number of captured DML , Commit and Rollback. This is what we call a batch.- Specified by:
getFetchingQueryCountin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- number of all processed batches
-
getBatchSize
public int getBatchSize()
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanMaximum number of entries in LogMiner view to fetch. This is used to set the diapason of the SCN in mining query. If difference between "start SCN" and "end SCN" to mine exceeds this limit, end SCN will be set to "start SCN" + batchSize- Specified by:
getBatchSizein interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the limit
-
getMillisecondToSleepBetweenMiningQuery
public long getMillisecondToSleepBetweenMiningQuery()
- Specified by:
getMillisecondToSleepBetweenMiningQueryin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- number of milliseconds for connector to sleep before fetching another batch from the LogMiner view
-
getHoursToKeepTransactionInBuffer
public int getHoursToKeepTransactionInBuffer()
- Specified by:
getHoursToKeepTransactionInBufferin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the number of hours to keep transaction in buffer before abandoning
-
getMaxBatchProcessingThroughput
public long getMaxBatchProcessingThroughput()
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanThis represents the maximum number of entries processed per second from LogMiner sessions. Entries include things such as DMLs, commits, rollbacks, etc.- Specified by:
getMaxBatchProcessingThroughputin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the maximum number of entries processed per second from LogMiner sessions
-
getNetworkConnectionProblemsCounter
public long getNetworkConnectionProblemsCounter()
- Specified by:
getNetworkConnectionProblemsCounterin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the number of connection problems detected
-
getTotalParseTimeInMilliseconds
public long getTotalParseTimeInMilliseconds()
- Specified by:
getTotalParseTimeInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the total number of milliseconds used to parse DDL/DML statements
-
addCurrentParseTime
public void addCurrentParseTime(Duration currentParseTime)
-
getTotalMiningSessionStartTimeInMilliseconds
public long getTotalMiningSessionStartTimeInMilliseconds()
- Specified by:
getTotalMiningSessionStartTimeInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the total number of milliseconds spent starting a log mining session
-
addCurrentMiningSessionStart
public void addCurrentMiningSessionStart(Duration currentStartLogMiningSession)
-
getLastMiningSessionStartTimeInMilliseconds
public long getLastMiningSessionStartTimeInMilliseconds()
- Specified by:
getLastMiningSessionStartTimeInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the total number of milliseconds the last mining session took to start
-
getMaxMiningSessionStartTimeInMilliseconds
public long getMaxMiningSessionStartTimeInMilliseconds()
- Specified by:
getMaxMiningSessionStartTimeInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the duration in milliseconds of the longest mining session start
-
getTotalProcessingTimeInMilliseconds
public long getTotalProcessingTimeInMilliseconds()
- Specified by:
getTotalProcessingTimeInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the total number of milliseconds spent mining and processing results
-
getMinBatchProcessingTimeInMilliseconds
public long getMinBatchProcessingTimeInMilliseconds()
- Specified by:
getMinBatchProcessingTimeInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the minimum time in milliseconds spent processing results from a single LogMiner session
-
getMaxBatchProcessingTimeInMilliseconds
public long getMaxBatchProcessingTimeInMilliseconds()
- Specified by:
getMaxBatchProcessingTimeInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the maximum time in milliseconds spent processing results from a single LogMiner session
-
setCurrentBatchProcessingTime
public void setCurrentBatchProcessingTime(Duration currentBatchProcessingTime)
-
addCurrentResultSetNext
public void addCurrentResultSetNext(Duration currentNextTime)
-
addProcessedRows
public void addProcessedRows(Long rows)
-
setBatchSize
public void setBatchSize(int size)
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanthis gives ability to manipulate number of entries in LogMiner view to fetch. It has limits to prevent abnormal values- Specified by:
setBatchSizein interfaceOracleStreamingChangeEventSourceMetricsMXBean- Parameters:
size- limit
-
setMillisecondToSleepBetweenMiningQuery
public void setMillisecondToSleepBetweenMiningQuery(long milliseconds)
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeansets number of milliseconds for connector to sleep before fetching another batch from the LogMiner view- Specified by:
setMillisecondToSleepBetweenMiningQueryin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Parameters:
milliseconds- to sleep
-
changeSleepingTime
public void changeSleepingTime(boolean increment)
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanchange sleeping time- Specified by:
changeSleepingTimein interfaceOracleStreamingChangeEventSourceMetricsMXBean- Parameters:
increment- true to add, false to deduct
-
changeBatchSize
public void changeBatchSize(boolean increment, boolean lobEnabled)- Specified by:
changeBatchSizein interfaceOracleStreamingChangeEventSourceMetricsMXBean
-
getNumberOfActiveTransactions
public long getNumberOfActiveTransactions()
- Specified by:
getNumberOfActiveTransactionsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- number of current active transactions in the transaction buffer
-
getNumberOfRolledBackTransactions
public long getNumberOfRolledBackTransactions()
- Specified by:
getNumberOfRolledBackTransactionsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the number of rolled back transactions in the transaction buffer
-
getNumberOfCommittedTransactions
public long getNumberOfCommittedTransactions()
- Specified by:
getNumberOfCommittedTransactionsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Specified by:
getNumberOfCommittedTransactionsin interfaceStreamingChangeEventSourceMetricsMXBean- Overrides:
getNumberOfCommittedTransactionsin classDefaultStreamingChangeEventSourceMetrics- Returns:
- the number of committed transactions in the transaction buffer
-
getCommitThroughput
public long getCommitThroughput()
- Specified by:
getCommitThroughputin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- average number of committed transactions per second in the transaction buffer
-
getRegisteredDmlCount
public long getRegisteredDmlCount()
- Specified by:
getRegisteredDmlCountin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the number of registered DML operations in the transaction buffer
-
getOldestScn
public String getOldestScn()
- Specified by:
getOldestScnin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the oldest SCN in the transaction buffer
-
getCommittedScn
public String getCommittedScn()
- Specified by:
getCommittedScnin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the last committed SCN from the transaction buffer
-
getOffsetScn
public String getOffsetScn()
- Specified by:
getOffsetScnin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the current offset SCN
-
getLagFromSourceInMilliseconds
public long getLagFromSourceInMilliseconds()
Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanLag can temporarily be inaccurate on DST changes. This is because the timestamps received from LogMiner are in the database local time and do not contain time zone information.- Specified by:
getLagFromSourceInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- lag in milliseconds of latest captured change timestamp from transaction logs and it's placement in the transaction buffer.
-
getMaxLagFromSourceInMilliseconds
public long getMaxLagFromSourceInMilliseconds()
- Specified by:
getMaxLagFromSourceInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- maximum lag in milliseconds with the data source
-
getMinLagFromSourceInMilliseconds
public long getMinLagFromSourceInMilliseconds()
- Specified by:
getMinLagFromSourceInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- minimum lag in milliseconds with the data source
-
getAbandonedTransactionIds
public Set<String> getAbandonedTransactionIds()
- Specified by:
getAbandonedTransactionIdsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- list of abandoned transaction ids from the transaction buffer
-
getRolledBackTransactionIds
public Set<String> getRolledBackTransactionIds()
- Specified by:
getRolledBackTransactionIdsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- slist of rolled back transaction ids from the transaction buffer
-
getLastCommitDurationInMilliseconds
public long getLastCommitDurationInMilliseconds()
- Specified by:
getLastCommitDurationInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- total duration in milliseconds the last commit operation took in the transaction buffer
-
getMaxCommitDurationInMilliseconds
public long getMaxCommitDurationInMilliseconds()
- Specified by:
getMaxCommitDurationInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the duration in milliseconds that the longest commit operation took in the transaction buffer
-
getErrorCount
public int getErrorCount()
- Specified by:
getErrorCountin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the number of errors detected in the connector's log
-
getWarningCount
public int getWarningCount()
- Specified by:
getWarningCountin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the number of warnings detected in the connector's log
-
getScnFreezeCount
public int getScnFreezeCount()
- Specified by:
getScnFreezeCountin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the number of number of times the SCN does not change and is considered frozen
-
getUnparsableDdlCount
public int getUnparsableDdlCount()
- Specified by:
getUnparsableDdlCountin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the number of unparsable ddl statements
-
getMiningSessionUserGlobalAreaMemoryInBytes
public long getMiningSessionUserGlobalAreaMemoryInBytes()
- Specified by:
getMiningSessionUserGlobalAreaMemoryInBytesin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the current mining session's UGA memory usage in bytes.
-
getMiningSessionUserGlobalAreaMaxMemoryInBytes
public long getMiningSessionUserGlobalAreaMaxMemoryInBytes()
- Specified by:
getMiningSessionUserGlobalAreaMaxMemoryInBytesin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the current mining session's UGA maximum memory usage in bytes.
-
getMiningSessionProcessGlobalAreaMemoryInBytes
public long getMiningSessionProcessGlobalAreaMemoryInBytes()
- Specified by:
getMiningSessionProcessGlobalAreaMemoryInBytesin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the current mining session's PGA memory usage in bytes.
-
getMiningSessionProcessGlobalAreaMaxMemoryInBytes
public long getMiningSessionProcessGlobalAreaMaxMemoryInBytes()
- Specified by:
getMiningSessionProcessGlobalAreaMaxMemoryInBytesin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the current mining session's PGA maximum memory usage in bytes.
-
setOldestScn
public void setOldestScn(Scn scn)
-
setCommittedScn
public void setCommittedScn(Scn scn)
-
setOffsetScn
public void setOffsetScn(Scn scn)
-
setActiveTransactions
public void setActiveTransactions(long activeTransactionCount)
-
incrementRolledBackTransactions
public void incrementRolledBackTransactions()
-
incrementCommittedTransactions
public void incrementCommittedTransactions()
-
incrementRegisteredDmlCount
public void incrementRegisteredDmlCount()
-
incrementCommittedDmlCount
public void incrementCommittedDmlCount(long counter)
-
incrementErrorCount
public void incrementErrorCount()
-
incrementWarningCount
public void incrementWarningCount()
-
incrementScnFreezeCount
public void incrementScnFreezeCount()
-
addAbandonedTransactionId
public void addAbandonedTransactionId(String transactionId)
-
addRolledBackTransactionId
public void addRolledBackTransactionId(String transactionId)
-
setLastCommitDuration
public void setLastCommitDuration(Duration lastDuration)
-
calculateTimeDifference
public void calculateTimeDifference(OffsetDateTime databaseSystemTime)
Calculates the time difference between the database server and the connector. Along with the time difference also the offset of the database server time to UTC is stored. Both values are required to calculate lag metrics.- Parameters:
databaseSystemTime- the system time (SYSTIMESTAMP) of the database
-
calculateLagMetrics
public void calculateLagMetrics(Instant changeTime)
-
incrementUnparsableDdlCount
public void incrementUnparsableDdlCount()
-
setUserGlobalAreaMemory
public void setUserGlobalAreaMemory(long ugaMemory, long ugaMaxMemory)
-
setProcessGlobalAreaMemory
public void setProcessGlobalAreaMemory(long pgaMemory, long pgaMaxMemory)
-
register
public abstract void register()
-
unregister
public abstract void unregister()
-
-