Class LogMinerStreamingChangeEventSourceMetrics
java.lang.Object
io.debezium.metrics.Metrics
io.debezium.pipeline.metrics.PipelineMetrics<P>
io.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics<OraclePartition>
io.debezium.connector.oracle.AbstractOracleStreamingChangeEventSourceMetrics
io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSourceMetrics
- All Implemented Interfaces:
LogMinerStreamingChangeEventSourceMetricsMXBean,OracleCommonStreamingChangeEventSourceMetricsMXBean,ChangeEventSourceMetrics<OraclePartition>,ChangeEventSourceMetricsMXBean,StreamingChangeEventSourceMetrics<OraclePartition>,StreamingChangeEventSourceMetricsMXBean,CommonEventMetricsMXBean,ConnectionMetricsMXBean,QueueMetricsMXBean,SchemaMetricsMXBean,StreamingMetricsMXBean,DataChangeEventListener<OraclePartition>,StreamingProgressListener
@ThreadSafe
public class LogMinerStreamingChangeEventSourceMetrics
extends AbstractOracleStreamingChangeEventSourceMetrics
implements LogMinerStreamingChangeEventSourceMetricsMXBean
Oracle Streaming Metrics implementation for the Oracle LogMiner streaming adapter.
- Author:
- Chris Cranford
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classUtility class for tracking histogram-based values for a duration-based metric.(package private) static classUtility class for maintaining a least-recently-used list of values.(package private) static classUtility class for tracking the current and maximum long value. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LogMinerStreamingChangeEventSourceMetrics.LRUSet<String>private final AtomicLongprivate final AtomicIntegerprivate final AtomicLongprivate final Clockprivate final AtomicReference<Scn>private final OracleConnectorConfigprivate final AtomicReference<String[]>private final AtomicReference<Scn>private final AtomicReference<ZoneOffset>private static final org.slf4j.Loggerprivate final AtomicIntegerprivate final AtomicIntegerprivate final AtomicLongprivate final AtomicLongprivate static final longprivate final AtomicLongprivate final AtomicReference<Scn>private final AtomicReference<Scn>private final AtomicReference<Instant>private final AtomicLongprivate final AtomicLongprivate final AtomicReference<String[]>private final AtomicLongprivate final LogMinerStreamingChangeEventSourceMetrics.LRUSet<String>private final AtomicLongprivate final AtomicLongprivate final Instantprivate final AtomicLongprivate static final intFields inherited from class io.debezium.pipeline.metrics.PipelineMetrics
metadataProvider, taskContext -
Constructor Summary
ConstructorsConstructorDescriptionLogMinerStreamingChangeEventSourceMetrics(CdcSourceTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig) LogMinerStreamingChangeEventSourceMetrics(CdcSourceTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig, Clock clock) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAbandonedTransactionId(String transactionId) Add a transaction to the recently tracked abandoned transactions metric.voidaddRolledBackTransactionId(String transactionId) Add a transaction to the recently rolled back transactions metric.voidcalculateLagFromSource(Instant changeTime) Calculates the lag metrics based on the provided event's database change time.longlongintSpecifies the maximum gap between the start and end system change number range used for querying changes from LogMiner.Oracle maintains two watermarks, a low and high system change number watermark.longString[]longlongReturns the time in milliseconds between when the database captured the change and when the change is placed into the transaction buffer by the connector.longlonglonglonglongintlonglonglonglonglonglongReturns the maximum time difference in milliseconds between the database capture time and the time when the event is placed into the transaction buffer by the connector.longlongSpecifies the number of milliseconds that transactions are retained in the transaction buffer before the connector discards them due to their age.longlonglonglonglonglonglongReturns the minimum time difference in milliseconds between the database capture time and the time when the event is placed into the transaction buffer by the connector.longlonglongOracle maintains two watermarks, a low and high system change number watermark.longString[]Exposes states of redo logs: current, active, inactive, unused ...longlonglonglonglonglonglonglongEach time a row is processed, the connector makes a call to the underlying JDBC driver to fetch the next row and sometimes this fetch may need to make a round-trip to the database to get the next batch of rows.voidIncrements the number of LogMiner queries executed.voidIncrements the number of over-sized transactions.voidIncrements the number of rolled back transactions.voidIncrements the number of times the system change number is considered frozen and has not changed over several consecutive LogMiner query batches.voidIncrements the total changes seen.voidreset()voidsetActiveTransactionCount(long activeTransactionCount) Sets the number of current, active transactions in the transaction buffer.voidsetBatchSize(int batchSize) Set the currently used batch size for querying LogMiner.voidsetCommitScn(Scn commitScn) Sets the offset's high-watermark system change number.voidsetCurrentLogFileNames(Set<String> logFileNames) Set the current iteration's logs that are being mined.voidsetCurrentScn(Scn currentScn) Set the current system change number from the database.voidsetDatabaseTimeDifference(OffsetDateTime databaseSystemTime) Sets the database time zone and calculates the difference in time between the database server and the connector.voidsetLastBatchProcessingDuration(Duration duration) Sets the duration of the total processing of the last LogMiner query result-set.voidsetLastCommitDuration(Duration duration) Sets the duration of the last transaction commit processing.voidsetLastDurationOfFetchQuery(Duration duration) Sets the duration of the last LogMiner query execution.voidsetLastMiningSessionStartDuration(Duration duration) Sets the duration of the last LogMiner mining session start-up and data dictionary load.voidsetLastParseTimeDuration(Duration duration) Sets the duration for parsing the last SQL statement.voidsetLastProcessedRowsCount(long processedRowsCount) Sets the last number of rows processed by the LogMiner mining iteration.voidsetLastResultSetNextDuration(Duration duration) Sets the duration for the lastResultSet#nextfunction call.voidsetOffsetScn(Scn offsetScn) Set the offset's low-watermark system change number.voidsetOldestScnDetails(Scn oldestScn, Instant changeTime) Sets the details for the oldest system change number in the transaction buffer.voidsetProcessGlobalAreaMemory(long memory, long maxMemory) Set the database's current process global area (PGA) memory statistics.voidsetRedoLogStatuses(Map<String, String> statuses) Set the current logs and their respective statuses.voidsetScnFreezeCount(long scnFreezeCount) Sets the number of times the system change number is considered frozen and has not changed over several consecutive LogMiner query batches.voidsetSleepTime(long sleepTime) Set the connector's currently used sleep/pause time between LogMiner queries.voidsetSwitchCount(int logSwitchCount) Set the number of log switches in the past day.voidsetUserGlobalAreaMemory(long memory, long maxMemory) Set the database's current user global area (UGA) memory statistics.toString()Methods inherited from class io.debezium.connector.oracle.AbstractOracleStreamingChangeEventSourceMetrics
getErrorCount, getLastCapturedDmlCount, getMaxCapturedDmlCountInBatch, getNumberOfCommittedTransactions, getTotalCapturedDmlCount, getTotalSchemaChangeParseErrorCount, getWarningCount, incrementCommittedTransactionCount, incrementErrorCount, incrementSchemaChangeParseErrorCount, incrementWarningCount, setLastCapturedDmlCountMethods inherited from class io.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics
connected, getCapturedTables, getLastTransactionId, getMilliSecondsBehindSource, 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.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.connector.oracle.logminer.LogMinerStreamingChangeEventSourceMetricsMXBean
getCurrentRedoLogFileName, getFetchingQueryCount, getHoursToKeepTransactionInBuffer, getMillisecondsToSleepBetweenMiningQuery, getNetworkConnectionProblemsCounter, getRedoLogStatus, getRegisteredDmlCount, getSwitchCounter, getTotalProcessingTimeInMillisecondsMethods inherited from interface io.debezium.connector.oracle.OracleCommonStreamingChangeEventSourceMetricsMXBean
getErrorCount, getLastCapturedDmlCount, getMaxCapturedDmlCountInBatch, getMaxCapturedDmlInBatch, getTotalCapturedDmlCount, getTotalSchemaChangeParseErrorCount, getUnparsableDdlCount, getWarningCountMethods 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, getNumberOfCommittedTransactions, 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:
-
connectorConfig
-
startTime
-
clock
-
currentScn
-
offsetScn
-
commitScn
-
oldestScn
-
oldestScnTime
-
currentLogFileNames
-
redoLogStatuses
-
databaseZoneOffset
-
batchSize
-
logSwitchCount
-
logMinerQueryCount
-
sleepTime
-
minimumLogsMined
-
maximumLogsMined
-
maxBatchProcessingThroughput
-
timeDifference
-
processedRowsCount
-
activeTransactionCount
-
rolledBackTransactionCount
-
oversizedTransactionCount
-
changesCount
-
scnFreezeCount
-
batchProcessingDuration
private final LogMinerStreamingChangeEventSourceMetrics.DurationHistogramMetric batchProcessingDuration -
fetchQueryDuration
-
commitDuration
-
lagFromSourceDuration
private final LogMinerStreamingChangeEventSourceMetrics.DurationHistogramMetric lagFromSourceDuration -
miningSessionStartupDuration
private final LogMinerStreamingChangeEventSourceMetrics.DurationHistogramMetric miningSessionStartupDuration -
parseTimeDuration
-
resultSetNextDuration
private final LogMinerStreamingChangeEventSourceMetrics.DurationHistogramMetric resultSetNextDuration -
userGlobalAreaMemory
-
processGlobalAreaMemory
-
abandonedTransactionIds
-
rolledBackTransactionIds
-
-
Constructor Details
-
LogMinerStreamingChangeEventSourceMetrics
public LogMinerStreamingChangeEventSourceMetrics(CdcSourceTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig) -
LogMinerStreamingChangeEventSourceMetrics
public LogMinerStreamingChangeEventSourceMetrics(CdcSourceTaskContext taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider, OracleConnectorConfig connectorConfig, Clock clock)
-
-
Method Details
-
reset
public void reset()- Specified by:
resetin interfaceChangeEventSourceMetricsMXBean- Overrides:
resetin classAbstractOracleStreamingChangeEventSourceMetrics
-
getMillisecondsToKeepTransactionsInBuffer
public long getMillisecondsToKeepTransactionsInBuffer()Description copied from interface:LogMinerStreamingChangeEventSourceMetricsMXBeanSpecifies the number of milliseconds that transactions are retained in the transaction buffer before the connector discards them due to their age. When set to0, transactions are retained until they are either committed or rolled back.- Specified by:
getMillisecondsToKeepTransactionsInBufferin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- number of milliseconds that transactions are buffered before being discarded
-
getSleepTimeInMilliseconds
public long getSleepTimeInMilliseconds()- Specified by:
getSleepTimeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- number of milliseconds that the connector sleeps between LogMiner queries
-
getCurrentScn
- Specified by:
getCurrentScnin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the current system change number of the database
-
getOffsetScn
Description copied from interface:LogMinerStreamingChangeEventSourceMetricsMXBeanOracle maintains two watermarks, a low and high system change number watermark. The low watermark is the offset system change number, which represents the position in the logs where the connector will begin reading changes upon restart.- Specified by:
getOffsetScnin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the system change number where the connector will start from on restarts
-
getCommittedScn
Description copied from interface:LogMinerStreamingChangeEventSourceMetricsMXBeanOracle maintains two watermarks, a low and high system change number watermark. The high watermark is the commit system change number, which represents the position in the logs where the last transaction commit occurred. This system change number is used to avoid dispatching any transaction that committed before this system change number.- Specified by:
getCommittedScnin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the system change number where the connector last observed a commit
-
getOldestScn
- Specified by:
getOldestScnin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- oldest system change number currently in the transaction buffer
-
getOldestScnAgeInMilliseconds
public long getOldestScnAgeInMilliseconds()- Specified by:
getOldestScnAgeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- age in milliseconds of the oldest system change number in the transaction buffer
-
getCurrentLogFileNames
- Specified by:
getCurrentLogFileNamesin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- array of current filenames to be used by the mining session
-
getBatchSize
public int getBatchSize()Description copied from interface:LogMinerStreamingChangeEventSourceMetricsMXBeanSpecifies the maximum gap between the start and end system change number range used for querying changes from LogMiner.- Specified by:
getBatchSizein interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the LogMiner query batch size
-
getMinimumMinedLogCount
public long getMinimumMinedLogCount()- Specified by:
getMinimumMinedLogCountin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the minimum number of logs used by a mining session
-
getMaximumMinedLogCount
public long getMaximumMinedLogCount()- Specified by:
getMaximumMinedLogCountin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the maximum number of logs used by a mining session
-
getRedoLogStatuses
Description copied from interface:LogMinerStreamingChangeEventSourceMetricsMXBeanExposes states of redo logs: current, active, inactive, unused ...- Specified by:
getRedoLogStatusesin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- array of: (redo log name | status) elements
-
getLogSwitchCount
public int getLogSwitchCount()- Specified by:
getLogSwitchCountin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the number of redo log switches for the current day
-
getTotalProcessedRows
public long getTotalProcessedRows()- Specified by:
getTotalProcessedRowsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the total number of database rows processed from LogMiner
-
getNumberOfActiveTransactions
public long getNumberOfActiveTransactions()- Specified by:
getNumberOfActiveTransactionsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- number of current active transactions in the transaction buffer
-
getNumberOfRolledBackTransactions
public long getNumberOfRolledBackTransactions()- Specified by:
getNumberOfRolledBackTransactionsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- number of transactions seen that were rolled back
-
getNumberOfOversizedTransactions
public long getNumberOfOversizedTransactions()- Specified by:
getNumberOfOversizedTransactionsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- number of discarded transactions due to exceeding max event size
-
getTotalChangesCount
public long getTotalChangesCount()- Specified by:
getTotalChangesCountin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- total number of changes seen by the connector.
-
getFetchQueryCount
public long getFetchQueryCount()- Specified by:
getFetchQueryCountin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- number of LogMiner queries executed.
-
getScnFreezeCount
public long getScnFreezeCount()- Specified by:
getScnFreezeCountin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- number of times the system change number does not change over consecutive LogMiner queries
-
getLastDurationOfFetchQueryInMilliseconds
public long getLastDurationOfFetchQueryInMilliseconds()- Specified by:
getLastDurationOfFetchQueryInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- duration of the last LogMiner query execution in milliseconds
-
getMaxDurationOfFetchQueryInMilliseconds
public long getMaxDurationOfFetchQueryInMilliseconds()- Specified by:
getMaxDurationOfFetchQueryInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- maximum duration across all LogMiner queries executed in milliseconds
-
getLastBatchProcessingTimeInMilliseconds
public long getLastBatchProcessingTimeInMilliseconds()- Specified by:
getLastBatchProcessingTimeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- duration for processing the results of the last LogMiner query in milliseconds
-
getMinBatchProcessingTimeInMilliseconds
public long getMinBatchProcessingTimeInMilliseconds()- Specified by:
getMinBatchProcessingTimeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- minimum duration in milliseconds for processing results from a LogMiner query
-
getMaxBatchProcessingTimeInMilliseconds
public long getMaxBatchProcessingTimeInMilliseconds()- Specified by:
getMaxBatchProcessingTimeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- maximum duration in milliseconds for processing results from a LogMiner query
-
getTotalBatchProcessingTimeInMilliseconds
public long getTotalBatchProcessingTimeInMilliseconds()- Specified by:
getTotalBatchProcessingTimeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- total duration in milliseconds for processing results for all LogMiner queries
-
getCommitThroughput
public long getCommitThroughput()- Specified by:
getCommitThroughputin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- average number of committed transactions per second in the transaction buffer
-
getLastBatchProcessingThroughput
public long getLastBatchProcessingThroughput()- Specified by:
getLastBatchProcessingThroughputin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- throughput per second for last LogMiner session
-
getMaxBatchProcessingThroughput
public long getMaxBatchProcessingThroughput()- Specified by:
getMaxBatchProcessingThroughputin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- maximum throughput per second across all LogMiner sessions
-
getAverageBatchProcessingThroughput
public long getAverageBatchProcessingThroughput()- Specified by:
getAverageBatchProcessingThroughputin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- average throughput per second across all LogMiner sessions
-
getLastCommitDurationInMilliseconds
public long getLastCommitDurationInMilliseconds()- Specified by:
getLastCommitDurationInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- duration for processing the last transaction commit in milliseconds
-
getMaxCommitDurationInMilliseconds
public long getMaxCommitDurationInMilliseconds()- Specified by:
getMaxCommitDurationInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- maximum duration for processing a transaction commit in milliseconds
-
getLastMiningSessionStartTimeInMilliseconds
public long getLastMiningSessionStartTimeInMilliseconds()- Specified by:
getLastMiningSessionStartTimeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- duration in milliseconds for the last LogMiner session start-up and data dictionary load
-
getMaxMiningSessionStartTimeInMilliseconds
public long getMaxMiningSessionStartTimeInMilliseconds()- Specified by:
getMaxMiningSessionStartTimeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- maximum duration in milliseconds for a LogMiner session start-up and data dictionary load
-
getTotalMiningSessionStartTimeInMilliseconds
public long getTotalMiningSessionStartTimeInMilliseconds()- Specified by:
getTotalMiningSessionStartTimeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- total duration in milliseconds for all LogMiner session start-ups and data dictionary loads
-
getTotalParseTimeInMilliseconds
public long getTotalParseTimeInMilliseconds()- Specified by:
getTotalParseTimeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- total duration in milliseconds for parsing SQL statements
-
getTotalResultSetNextTimeInMilliseconds
public long getTotalResultSetNextTimeInMilliseconds()Description copied from interface:LogMinerStreamingChangeEventSourceMetricsMXBeanEach time a row is processed, the connector makes a call to the underlying JDBC driver to fetch the next row and sometimes this fetch may need to make a round-trip to the database to get the next batch of rows. This metric tracks the total time spent in milliseconds for this particular call over the lifetime of the connector.- Specified by:
getTotalResultSetNextTimeInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- total duration in milliseconds for all
ResultSet#nextcalls
-
getLagFromSourceInMilliseconds
public long getLagFromSourceInMilliseconds()Description copied from interface:LogMinerStreamingChangeEventSourceMetricsMXBeanReturns the time in milliseconds between when the database captured the change and when the change is placed into the transaction buffer by the connector.- Specified by:
getLagFromSourceInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- duration of the lag from the source database in milliseconds
-
getMinLagFromSourceInMilliseconds
public long getMinLagFromSourceInMilliseconds()Description copied from interface:LogMinerStreamingChangeEventSourceMetricsMXBeanReturns the minimum time difference in milliseconds between the database capture time and the time when the event is placed into the transaction buffer by the connector.- Specified by:
getMinLagFromSourceInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- minimum duration of the lag from the source database in milliseconds
-
getMaxLagFromSourceInMilliseconds
public long getMaxLagFromSourceInMilliseconds()Description copied from interface:LogMinerStreamingChangeEventSourceMetricsMXBeanReturns the maximum time difference in milliseconds between the database capture time and the time when the event is placed into the transaction buffer by the connector.- Specified by:
getMaxLagFromSourceInMillisecondsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- maximum duration of the lag from the source database in milliseconds
-
getMiningSessionUserGlobalAreaMemoryInBytes
public long getMiningSessionUserGlobalAreaMemoryInBytes()- Specified by:
getMiningSessionUserGlobalAreaMemoryInBytesin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the current mining session's UGA memory usage in bytes.
-
getMiningSessionUserGlobalAreaMaxMemoryInBytes
public long getMiningSessionUserGlobalAreaMaxMemoryInBytes()- Specified by:
getMiningSessionUserGlobalAreaMaxMemoryInBytesin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the current mining session's UGA maximum memory usage in bytes.
-
getMiningSessionProcessGlobalAreaMemoryInBytes
public long getMiningSessionProcessGlobalAreaMemoryInBytes()- Specified by:
getMiningSessionProcessGlobalAreaMemoryInBytesin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the current mining session's PGA memory usage in bytes.
-
getMiningSessionProcessGlobalAreaMaxMemoryInBytes
public long getMiningSessionProcessGlobalAreaMaxMemoryInBytes()- Specified by:
getMiningSessionProcessGlobalAreaMaxMemoryInBytesin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- the current mining session's PGA maximum memory usage in bytes.
-
getAbandonedTransactionIds
- Specified by:
getAbandonedTransactionIdsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- most recent transaction identifiers that were abandoned
-
getAbandonedTransactionCount
public long getAbandonedTransactionCount()- Specified by:
getAbandonedTransactionCountin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean
-
getRolledBackTransactionIds
- Specified by:
getRolledBackTransactionIdsin interfaceLogMinerStreamingChangeEventSourceMetricsMXBean- Returns:
- most recent transaction identifiers that were rolled back
-
getDatabaseOffset
- Returns:
- database current zone offset
-
setBatchSize
public void setBatchSize(int batchSize) Set the currently used batch size for querying LogMiner.- Parameters:
batchSize- batch size used for querying LogMiner
-
setSleepTime
public void setSleepTime(long sleepTime) Set the connector's currently used sleep/pause time between LogMiner queries.- Parameters:
sleepTime- sleep time between LogMiner queries
-
setCurrentScn
Set the current system change number from the database.- Parameters:
currentScn- database current system change number
-
setOffsetScn
Set the offset's low-watermark system change number.- Parameters:
offsetScn- offset's restart system change number, i.e.scnattribute
-
setCommitScn
Sets the offset's high-watermark system change number.- Parameters:
commitScn- offset's commit system change number, i.e.commit_scnattribute
-
setOldestScnDetails
Sets the details for the oldest system change number in the transaction buffer.- Parameters:
oldestScn- oldest system change numberchangeTime- time when the oldest system change number was created
-
setCurrentLogFileNames
Set the current iteration's logs that are being mined.- Parameters:
logFileNames- current set of logs that are part of the mining session.
-
setRedoLogStatuses
Set the current logs and their respective statuses.- Parameters:
statuses- map of file names as key and the file's status as the value.
-
setSwitchCount
public void setSwitchCount(int logSwitchCount) Set the number of log switches in the past day.- Parameters:
logSwitchCount- number of log switches
-
setLastProcessedRowsCount
public void setLastProcessedRowsCount(long processedRowsCount) Sets the last number of rows processed by the LogMiner mining iteration.- Parameters:
processedRowsCount- number of rows processed in the last mining iteration
-
setActiveTransactionCount
public void setActiveTransactionCount(long activeTransactionCount) Sets the number of current, active transactions in the transaction buffer.- Parameters:
activeTransactionCount- number of active transactions
-
incrementRolledBackTransactionCount
public void incrementRolledBackTransactionCount()Increments the number of rolled back transactions. -
incrementOversizedTransactionCount
public void incrementOversizedTransactionCount()Increments the number of over-sized transactions. -
incrementTotalChangesCount
public void incrementTotalChangesCount()Increments the total changes seen. -
incrementLogMinerQueryCount
public void incrementLogMinerQueryCount()Increments the number of LogMiner queries executed. -
incrementScnFreezeCount
public void incrementScnFreezeCount()Increments the number of times the system change number is considered frozen and has not changed over several consecutive LogMiner query batches. -
setScnFreezeCount
public void setScnFreezeCount(long scnFreezeCount) Sets the number of times the system change number is considered frozen and has not changed over several consecutive LogMiner query batches.- Parameters:
scnFreezeCount- number of times the system change number is considered frozen
-
setLastDurationOfFetchQuery
Sets the duration of the last LogMiner query execution.- Parameters:
duration- duration of the last LogMiner query
-
setLastBatchProcessingDuration
Sets the duration of the total processing of the last LogMiner query result-set.- Parameters:
duration- duration of the total processing of the last LogMiner query result-set
-
setLastCommitDuration
Sets the duration of the last transaction commit processing.- Parameters:
duration- duration of the last transaction commit processing
-
setLastMiningSessionStartDuration
Sets the duration of the last LogMiner mining session start-up and data dictionary load.- Parameters:
duration- duration of the last LogMiner session start-up
-
setLastParseTimeDuration
Sets the duration for parsing the last SQL statement.- Parameters:
duration- duration for parsing the last SQL statement
-
setLastResultSetNextDuration
Sets the duration for the lastResultSet#nextfunction call.- Parameters:
duration- duration for the last result set next call
-
setUserGlobalAreaMemory
public void setUserGlobalAreaMemory(long memory, long maxMemory) Set the database's current user global area (UGA) memory statistics.- Parameters:
memory- current user global area memorymaxMemory- maximum user global area memory
-
setProcessGlobalAreaMemory
public void setProcessGlobalAreaMemory(long memory, long maxMemory) Set the database's current process global area (PGA) memory statistics.- Parameters:
memory- current process global area memorymaxMemory- maximum process global area memory
-
addAbandonedTransactionId
Add a transaction to the recently tracked abandoned transactions metric.- Parameters:
transactionId- transaction identifier
-
addRolledBackTransactionId
Add a transaction to the recently rolled back transactions metric.- Parameters:
transactionId- transaction identifier
-
setDatabaseTimeDifference
Sets the database time zone and calculates the difference in time between the database server and the connector. These values are necessary to calculate lag metrics.- Parameters:
databaseSystemTime- the databaseSYSTIMESTAMPvalue
-
calculateLagFromSource
Calculates the lag metrics based on the provided event's database change time.- Parameters:
changeTime- the change time when the database recorded the event
-
toString
-