@ThreadSafe public class TransactionalBufferMetrics extends io.debezium.metrics.Metrics implements TransactionalBufferMetricsMXBean
| Modifier and Type | Field and Description |
|---|---|
private AtomicReference<Set<String>> |
abandonedTransactionIds |
private AtomicInteger |
activeTransactions |
private AtomicReference<Duration> |
averageLagsFromTheSource |
private AtomicLong |
capturedDmlCounter |
private AtomicInteger |
commitQueueCapacity |
private AtomicLong |
committedDmlCounter |
private AtomicLong |
committedScn |
private AtomicLong |
committedTransactions |
private AtomicInteger |
errorCounter |
private AtomicReference<Duration> |
lagFromTheSource |
private AtomicReference<Duration> |
maxLagFromTheSource |
private static long |
MILLIS_PER_SECOND |
private AtomicReference<Duration> |
minLagFromTheSource |
private AtomicLong |
oldestScn |
private AtomicReference<Set<String>> |
rolledBackTransactionIds |
private AtomicLong |
rolledBackTransactions |
private AtomicInteger |
scnFreezeCounter |
private Instant |
startTime |
private AtomicLong |
timeDifference |
private AtomicInteger |
warningCounter |
| Constructor and Description |
|---|
TransactionalBufferMetrics(io.debezium.connector.common.CdcSourceTaskContext taskContext) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addAbandonedTransactionId(String transactionId) |
(package private) void |
addRolledBackTransactionId(String transactionId) |
(package private) void |
calculateLagMetrics(Instant changeTime) |
Set<String> |
getAbandonedTransactionIds()
This is to get list of removed transactions from the Transactional Buffer
|
long |
getAverageLagFromSource()
This is to get average value of the time difference between logging of source DB records into redo log and capturing it by Log Miner.
|
long |
getCapturedDmlCount()
exposes total number of captured DMLs
|
long |
getCapturedDmlThroughput()
Exposes average number of captured and parsed DML per second
|
int |
getCommitQueueCapacity()
Gets commit queue capacity.
|
Long |
getCommittedScn()
It shows last committed SCN
|
long |
getCommitThroughput()
Exposes average number of committed transactions per second
|
int |
getErrorCounter()
This is to get logged logError counter.
|
long |
getLagFromSource()
This is to get the lag between latest captured change timestamp in REDO LOG and time of it's placement in the buffer
|
long |
getMaxLagFromSource()
This is to get max value of the time difference between logging of source DB records into redo log and capturing it by Log Miner
|
long |
getMinLagFromSource()
This is to get min value of the time difference between logging of source DB records into redo log and capturing it by Log Miner
|
int |
getNumberOfActiveTransactions()
Exposes number of transaction, buffered in memory
|
long |
getNumberOfCommittedTransactions()
Exposes number of committed transactions
|
long |
getNumberOfRolledBackTransactions()
Exposes number of rolled back transactions
|
Long |
getOldestScn()
Exposes the oldest(smallest) SCN in the Transactional Buffer
|
Set<String> |
getRolledBackTransactionIds()
See which transactions were rolled back
|
int |
getScnFreezeCounter()
Get counter of encountered observations when SCN does not change in the offset.
|
int |
getWarningCounter()
This is to get logged warning counter
|
(package private) void |
incrementCapturedDmlCounter() |
(package private) void |
incrementCommittedDmlCounter(int counter) |
(package private) void |
incrementCommittedTransactions() |
(package private) void |
incrementErrorCounter()
This is to increase logged logError counter.
|
(package private) void |
incrementRolledBackTransactions() |
(package private) void |
incrementScnFreezeCounter()
This counter to accumulate number of encountered observations when SCN does not change in the offset.
|
(package private) void |
incrementWarningCounter()
This is to increase logged warning counter
There are other ways to monitor the log, but this is just to check if there are any.
|
void |
reset()
action to reset some metrics
|
(package private) void |
setActiveTransactions(Integer counter) |
(package private) void |
setCommitQueueCapacity(int commitQueueCapacity) |
void |
setCommittedScn(Long scn) |
(package private) void |
setOldestScn(Long scn) |
void |
setTimeDifference(AtomicLong timeDifference) |
String |
toString() |
private final AtomicLong oldestScn
private final AtomicLong committedScn
private final AtomicReference<Duration> lagFromTheSource
private final AtomicInteger activeTransactions
private final AtomicLong rolledBackTransactions
private final AtomicLong committedTransactions
private final AtomicLong capturedDmlCounter
private final AtomicLong committedDmlCounter
private final AtomicInteger commitQueueCapacity
private final AtomicReference<Duration> maxLagFromTheSource
private final AtomicReference<Duration> minLagFromTheSource
private final AtomicReference<Duration> averageLagsFromTheSource
private final AtomicReference<Set<String>> abandonedTransactionIds
private final AtomicReference<Set<String>> rolledBackTransactionIds
private final Instant startTime
private static final long MILLIS_PER_SECOND
private final AtomicLong timeDifference
private final AtomicInteger errorCounter
private final AtomicInteger warningCounter
private final AtomicInteger scnFreezeCounter
TransactionalBufferMetrics(io.debezium.connector.common.CdcSourceTaskContext taskContext)
void setOldestScn(Long scn)
public void setCommittedScn(Long scn)
public void setTimeDifference(AtomicLong timeDifference)
void calculateLagMetrics(Instant changeTime)
void setActiveTransactions(Integer counter)
void incrementRolledBackTransactions()
void incrementCommittedTransactions()
void incrementCapturedDmlCounter()
void incrementCommittedDmlCounter(int counter)
void addAbandonedTransactionId(String transactionId)
void addRolledBackTransactionId(String transactionId)
void incrementErrorCounter()
void incrementWarningCounter()
void incrementScnFreezeCounter()
public Long getOldestScn()
TransactionalBufferMetricsMXBeangetOldestScn in interface TransactionalBufferMetricsMXBeanpublic Long getCommittedScn()
TransactionalBufferMetricsMXBeangetCommittedScn in interface TransactionalBufferMetricsMXBeanpublic int getNumberOfActiveTransactions()
TransactionalBufferMetricsMXBeangetNumberOfActiveTransactions in interface TransactionalBufferMetricsMXBeanpublic long getNumberOfRolledBackTransactions()
TransactionalBufferMetricsMXBeangetNumberOfRolledBackTransactions in interface TransactionalBufferMetricsMXBeanpublic long getNumberOfCommittedTransactions()
TransactionalBufferMetricsMXBeangetNumberOfCommittedTransactions in interface TransactionalBufferMetricsMXBeanpublic long getCommitThroughput()
TransactionalBufferMetricsMXBeangetCommitThroughput in interface TransactionalBufferMetricsMXBeanpublic long getCapturedDmlThroughput()
TransactionalBufferMetricsMXBeangetCapturedDmlThroughput in interface TransactionalBufferMetricsMXBeanpublic long getCapturedDmlCount()
TransactionalBufferMetricsMXBeangetCapturedDmlCount in interface TransactionalBufferMetricsMXBeanpublic long getLagFromSource()
TransactionalBufferMetricsMXBeangetLagFromSource in interface TransactionalBufferMetricsMXBeanpublic long getMaxLagFromSource()
TransactionalBufferMetricsMXBeangetMaxLagFromSource in interface TransactionalBufferMetricsMXBeanpublic long getMinLagFromSource()
TransactionalBufferMetricsMXBeangetMinLagFromSource in interface TransactionalBufferMetricsMXBeanpublic long getAverageLagFromSource()
TransactionalBufferMetricsMXBeangetAverageLagFromSource in interface TransactionalBufferMetricsMXBeanpublic Set<String> getAbandonedTransactionIds()
TransactionalBufferMetricsMXBeangetAbandonedTransactionIds in interface TransactionalBufferMetricsMXBeanpublic Set<String> getRolledBackTransactionIds()
TransactionalBufferMetricsMXBeangetRolledBackTransactionIds in interface TransactionalBufferMetricsMXBeanpublic int getErrorCounter()
TransactionalBufferMetricsMXBeangetErrorCounter in interface TransactionalBufferMetricsMXBeanpublic int getWarningCounter()
TransactionalBufferMetricsMXBeangetWarningCounter in interface TransactionalBufferMetricsMXBeanpublic int getScnFreezeCounter()
TransactionalBufferMetricsMXBeangetScnFreezeCounter in interface TransactionalBufferMetricsMXBeanpublic int getCommitQueueCapacity()
TransactionalBufferMetricsMXBeangetCommitQueueCapacity in interface TransactionalBufferMetricsMXBeanvoid setCommitQueueCapacity(int commitQueueCapacity)
public void reset()
TransactionalBufferMetricsMXBeanreset in interface TransactionalBufferMetricsMXBeanCopyright © 2020 JBoss by Red Hat. All rights reserved.