Package io.debezium.connector.oracle
Class OracleStreamingChangeEventSourceMetrics
java.lang.Object
io.debezium.metrics.Metrics
io.debezium.pipeline.metrics.PipelineMetrics<P>
io.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics<OraclePartition>
io.debezium.connector.oracle.OracleStreamingChangeEventSourceMetrics
- All Implemented Interfaces:
OracleStreamingChangeEventSourceMetricsMXBean,ChangeEventSourceMetrics<OraclePartition>,ChangeEventSourceMetricsMXBean,StreamingChangeEventSourceMetrics<OraclePartition>,StreamingChangeEventSourceMetricsMXBean,CommonEventMetricsMXBean,ConnectionMetricsMXBean,QueueMetricsMXBean,SchemaMetricsMXBean,StreamingMetricsMXBean,DataChangeEventListener<OraclePartition>,StreamingProgressListener
@ThreadSafe
public class OracleStreamingChangeEventSourceMetrics
extends DefaultStreamingChangeEventSourceMetrics<OraclePartition>
implements OracleStreamingChangeEventSourceMetricsMXBean
The metrics implementation for Oracle connector streaming phase.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicReference<LRUCacheMap<String,String>> private final AtomicLongprivate final AtomicIntegerprivate final intprivate final intprivate final intprivate final Clockprivate final AtomicLongprivate final AtomicReference<Scn>private final AtomicLongprivate final AtomicReference<String[]>private final AtomicReference<Scn>private final AtomicIntegerprivate final AtomicIntegerprivate final AtomicReference<Duration>private final AtomicReference<Duration>private final AtomicIntegerprivate final AtomicReference<Duration>private final AtomicReference<Duration>private final AtomicReference<Duration>private static final org.slf4j.Loggerprivate final AtomicIntegerprivate final AtomicLongprivate final AtomicReference<Duration>private final AtomicLongprivate final AtomicReference<Duration>private final AtomicReference<Duration>private final AtomicLongprivate final AtomicReference<Duration>private final AtomicReference<Duration>private static final longprivate final AtomicLongprivate final AtomicReference<Duration>private final AtomicLongprivate final AtomicLongprivate final AtomicLongprivate final AtomicLongprivate final AtomicLongprivate final AtomicReference<Duration>private final AtomicLongprivate final AtomicReference<Scn>private final AtomicReference<Scn>private final AtomicReference<String[]>private final AtomicLongprivate final AtomicReference<LRUCacheMap<String,String>> private final AtomicLongprivate final AtomicIntegerprivate final longprivate final longprivate final longprivate final longprivate final Instantprivate final AtomicIntegerprivate final AtomicLongprivate final AtomicReference<Duration>private final AtomicIntegerprivate final AtomicReference<Duration>private final AtomicReference<Duration>private final AtomicLongprivate final AtomicReference<Duration>private final AtomicReference<Duration>private final AtomicReference<Duration>private static final intprivate final AtomicIntegerprivate final AtomicIntegerprivate final AtomicReference<ZoneOffset>Fields inherited from class io.debezium.pipeline.metrics.PipelineMetrics
metadataProvider, taskContext -
Constructor Summary
ConstructorsConstructorDescriptionOracleStreamingChangeEventSourceMetrics(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
Modifier and TypeMethodDescriptionvoidaddAbandonedTransactionId(String transactionId) voidaddCurrentMiningSessionStart(Duration currentStartLogMiningSession) voidaddCurrentParseTime(Duration currentParseTime) voidaddCurrentResultSetNext(Duration currentNextTime) voidaddProcessedRows(Long rows) voidaddRolledBackTransactionId(String transactionId) voidcalculateLagMetrics(Instant changeTime) voidcalculateTimeDifference(OffsetDateTime databaseSystemTime) Calculates the time difference between the database server and the connector.voidchangeBatchSize(boolean increment, boolean lobEnabled) voidchangeSleepingTime(boolean increment) change sleeping timelongThis represents the average number of entries processed per second from LogMiner sessions.intMaximum number of entries in LogMiner view to fetch.longString[]intlongLogMiner view query returns number of captured DML , Commit and Rollback.intlongLag can temporarily be inaccurate on DST changes.longThis represents the number of entries processed per second in the last LogMiner session.longintlongLogMiner view query returns number of captured DML , Commit and Rollback.longlongThis represents the maximum number of entries processed per second from LogMiner sessions.longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglongString[]Exposes states of redo logs: current, active, inactive, unused ...longintintfetches counter of redo switches for the last day.longlonglonglonglonglongintintvoidincrementCommittedDmlCount(long counter) voidvoidvoidvoidvoidvoidvoidvoidvoidreset()Resets metrics.voidsetActiveTransactions(long activeTransactionCount) voidsetBatchSize(int size) this gives ability to manipulate number of entries in LogMiner view to fetch.voidsetCommittedScn(Scn scn) voidsetCurrentBatchProcessingTime(Duration currentBatchProcessingTime) voidsetCurrentLogFileName(Set<String> names) voidsetCurrentScn(Scn scn) voidsetLastCapturedDmlCount(int dmlCount) voidsetLastCommitDuration(Duration lastDuration) voidsetLastDurationOfBatchCapturing(Duration lastDuration) voidsetLastDurationOfBatchProcessing(Duration lastDuration) voidsetMillisecondToSleepBetweenMiningQuery(long milliseconds) sets number of milliseconds for connector to sleep before fetching another batch from the LogMiner viewvoidsetOffsetScn(Scn scn) voidsetOldestScn(Scn scn) voidsetProcessGlobalAreaMemory(long pgaMemory, long pgaMaxMemory) voidsetRedoLogStatus(Map<String, String> status) voidsetSwitchCount(int counter) voidsetUserGlobalAreaMemory(long ugaMemory, long ugaMaxMemory) toString()Methods inherited from class io.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics
connected, getCapturedTables, getLastTransactionId, getMilliSecondsBehindSource, getMonitoredTables, getSourceEventPosition, isConnected, onConnectorEvent, onEventMethods inherited from class io.debezium.pipeline.metrics.PipelineMetrics
getCurrentQueueSizeInBytes, getLastEvent, getMaxQueueSizeInBytes, getMilliSecondsSinceLastEvent, getNumberOfErroneousEvents, getNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacity, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfEventsSeen, getTotalNumberOfUpdateEventsSeen, onErroneousEvent, onErroneousEvent, onFilteredEvent, onFilteredEventMethods inherited from class io.debezium.metrics.Metrics
metricName, metricName, register, unregisterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.debezium.pipeline.metrics.ChangeEventSourceMetrics
register, unregisterMethods inherited from interface io.debezium.pipeline.metrics.ChangeEventSourceMetricsMXBean
getMonitoredTablesMethods inherited from interface io.debezium.pipeline.metrics.traits.CommonEventMetricsMXBean
getLastEvent, getMilliSecondsSinceLastEvent, getNumberOfErroneousEvents, getNumberOfEventsFiltered, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfEventsSeen, getTotalNumberOfUpdateEventsSeenMethods inherited from interface io.debezium.pipeline.metrics.traits.ConnectionMetricsMXBean
isConnectedMethods inherited from interface io.debezium.pipeline.source.spi.DataChangeEventListener
onErroneousEvent, onErroneousEvent, onFilteredEvent, onFilteredEventMethods inherited from interface io.debezium.pipeline.metrics.traits.QueueMetricsMXBean
getCurrentQueueSizeInBytes, getMaxQueueSizeInBytes, getQueueRemainingCapacity, getQueueTotalCapacityMethods inherited from interface io.debezium.pipeline.metrics.traits.SchemaMetricsMXBean
getCapturedTablesMethods inherited from interface io.debezium.pipeline.metrics.traits.StreamingMetricsMXBean
getLastTransactionId, getMilliSecondsBehindSource, getSourceEventPosition
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MILLIS_PER_SECOND
private static final long MILLIS_PER_SECOND- See Also:
-
TRANSACTION_ID_SET_SIZE
private static final int TRANSACTION_ID_SET_SIZE- See Also:
-
currentScn
-
logMinerQueryCount
-
totalCapturedDmlCount
-
totalDurationOfFetchingQuery
-
lastCapturedDmlCount
-
lastDurationOfFetchingQuery
-
maxCapturedDmlCount
-
totalProcessedRows
-
maxDurationOfFetchingQuery
-
totalBatchProcessingDuration
-
lastBatchProcessingDuration
-
totalParseTime
-
totalStartLogMiningSessionDuration
-
lastStartLogMiningSessionDuration
-
maxStartingLogMiningSessionDuration
-
totalProcessingTime
-
minBatchProcessingTime
-
maxBatchProcessingTime
-
totalResultSetNextTime
-
maxBatchProcessingThroughput
-
currentLogFileName
-
redoLogStatus
-
minimumLogsMined
-
maximumLogsMined
-
switchCounter
-
batchSize
-
millisecondToSleepBetweenMiningQuery
-
hoursToKeepTransaction
-
networkConnectionProblemsCounter
-
lagFromTheSourceDuration
-
minLagFromTheSourceDuration
-
maxLagFromTheSourceDuration
-
lastCommitDuration
-
maxCommitDuration
-
activeTransactions
-
rolledBackTransactions
-
committedTransactions
-
abandonedTransactionIds
-
rolledBackTransactionIds
-
registeredDmlCount
-
committedDmlCount
-
errorCount
-
warningCount
-
scnFreezeCount
-
timeDifference
-
zoneOffset
-
oldestScn
-
committedScn
-
offsetScn
-
unparsableDdlCount
-
miningSessionUserGlobalAreaMemory
-
miningSessionUserGlobalAreaMaxMemory
-
miningSessionProcessGlobalAreaMemory
-
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
-
clock
-
-
Constructor Details
-
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 Details
-
reset
public void reset()Description copied from interface:OracleStreamingChangeEventSourceMetricsMXBeanResets metrics.- Specified by:
resetin interfaceChangeEventSourceMetricsMXBean- Specified by:
resetin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Overrides:
resetin classDefaultStreamingChangeEventSourceMetrics<OraclePartition>
-
setCurrentScn
-
setCurrentLogFileName
-
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
-
setRedoLogStatus
-
setSwitchCount
public void setSwitchCount(int counter) -
setLastCapturedDmlCount
public void setLastCapturedDmlCount(int dmlCount) -
setLastDurationOfBatchCapturing
-
setLastDurationOfBatchProcessing
-
incrementNetworkConnectionProblemsCounter
public void incrementNetworkConnectionProblemsCounter() -
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
- Specified by:
getCurrentRedoLogFileNamein interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- array of current filenames to be used by the mining session.
-
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
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
- Specified by:
getMaxDurationOfFetchQueryInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- average duration of LogMiner view query
-
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
-
getTotalMiningSessionStartTimeInMilliseconds
public long getTotalMiningSessionStartTimeInMilliseconds()- Specified by:
getTotalMiningSessionStartTimeInMillisecondsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the total number of milliseconds spent starting a log mining session
-
addCurrentMiningSessionStart
-
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
-
addCurrentResultSetNext
-
addProcessedRows
-
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 interfaceStreamingMetricsMXBean- Overrides:
getNumberOfCommittedTransactionsin classDefaultStreamingChangeEventSourceMetrics<OraclePartition>- 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
- Specified by:
getOldestScnin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the oldest SCN in the transaction buffer
-
getCommittedScn
- Specified by:
getCommittedScnin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- the last committed SCN from the transaction buffer
-
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
- Specified by:
getAbandonedTransactionIdsin interfaceOracleStreamingChangeEventSourceMetricsMXBean- Returns:
- list of abandoned transaction ids from the transaction buffer
-
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
-
setCommittedScn
-
setOffsetScn
-
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
-
addRolledBackTransactionId
-
setLastCommitDuration
-
calculateTimeDifference
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
-
getDatabaseOffset
-
calculateLagMetrics
-
incrementUnparsableDdlCount
public void incrementUnparsableDdlCount() -
setUserGlobalAreaMemory
public void setUserGlobalAreaMemory(long ugaMemory, long ugaMaxMemory) -
setProcessGlobalAreaMemory
public void setProcessGlobalAreaMemory(long pgaMemory, long pgaMaxMemory) -
toString
-