class BinlogReaderMetrics extends PipelineMetrics implements BinlogReaderMetricsMXBean
| Modifier and Type | Field and Description |
|---|---|
private com.github.shyiko.mysql.binlog.BinaryLogClient |
client |
private AtomicBoolean |
isGtidModeEnabled |
private AtomicReference<String> |
lastTransactionId |
private AtomicLong |
milliSecondsBehindMaster |
private AtomicLong |
numberOfCommittedTransactions |
private AtomicLong |
numberOfLargeTransactions |
private AtomicLong |
numberOfNotWellFormedTransactions |
private AtomicLong |
numberOfRolledBackTransactions |
private MySqlSchema |
schema |
private com.github.shyiko.mysql.binlog.jmx.BinaryLogClientStatistics |
stats |
clock, lastEventTimestamp, metadataProvider, numberOfErroneousEvents, taskContext, totalNumberOfEventsSeenNO_OP| Constructor and Description |
|---|
BinlogReaderMetrics(com.github.shyiko.mysql.binlog.BinaryLogClient client,
MySqlTaskContext taskContext,
String name,
ChangeEventQueueMetrics changeEventQueueMetrics) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBinlogFilename()
Name of the current MySQL binlog file being read by underlying mysql-binlog-client.
|
long |
getBinlogPosition()
Current MySQL binlog offset position being read by underlying mysql-binlog-client.
|
String |
getGtidSet()
Current MySQL Gtid being read by underlying mysql-binlog-client.
|
boolean |
getIsGtidModeEnabled()
Tracks if the connector is running using Gtids to track current offset.
|
String |
getLastEvent() |
String |
getLastTransactionId() |
long |
getMilliSecondsBehindSource() |
long |
getMilliSecondsSinceLastEvent() |
String[] |
getMonitoredTables() |
long |
getNumberOfCommittedTransactions()
Tracks the number of committed transactions.
|
long |
getNumberOfDisconnects()
Tracks the number of times the underlying mysql-binlog-client has been disconnected from MySQL.
|
long |
getNumberOfLargeTransactions()
Tracks the number of transaction which contains events that contained more entries than could be contained
within the connectors
EventBuffer instance. |
long |
getNumberOfNotWellFormedTransactions()
Tracks the number of transactions which are not well-formed.
|
long |
getNumberOfRolledBackTransactions()
Tracks the number of rolled back transactions.
|
long |
getNumberOfSkippedEvents()
Tracks the number of events skipped by underlying mysql-binlog-client, generally due to the client
being unable to properly deserialize the event.
|
Map<String,String> |
getSourceEventPosition() |
long |
getTotalNumberOfEventsSeen() |
boolean |
isConnected() |
void |
onCommittedTransaction() |
void |
onGtidChange(String gtid) |
void |
onLargeTransaction() |
void |
onNotWellFormedTransaction() |
void |
onRolledBackTransaction() |
void |
reset() |
void |
setIsGtidModeEnabled(boolean enabled) |
void |
setMilliSecondsBehindSource(long value) |
getNumberOfErroneousEvents, getNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacity, onConnectorEvent, onErroneousEvent, onEvent, onFilteredEventmetricName, register, unregisterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNumberOfErroneousEvents, getNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacityprivate final com.github.shyiko.mysql.binlog.BinaryLogClient client
private final com.github.shyiko.mysql.binlog.jmx.BinaryLogClientStatistics stats
private final MySqlSchema schema
private final AtomicLong numberOfCommittedTransactions
private final AtomicLong numberOfRolledBackTransactions
private final AtomicLong numberOfNotWellFormedTransactions
private final AtomicLong numberOfLargeTransactions
private final AtomicBoolean isGtidModeEnabled
private final AtomicLong milliSecondsBehindMaster
private final AtomicReference<String> lastTransactionId
public BinlogReaderMetrics(com.github.shyiko.mysql.binlog.BinaryLogClient client,
MySqlTaskContext taskContext,
String name,
ChangeEventQueueMetrics changeEventQueueMetrics)
public boolean isConnected()
isConnected in interface StreamingChangeEventSourceMetricsMXBeanpublic String getBinlogFilename()
BinlogReaderMetricsMXBeangetBinlogFilename in interface BinlogReaderMetricsMXBeanpublic long getBinlogPosition()
BinlogReaderMetricsMXBeangetBinlogPosition in interface BinlogReaderMetricsMXBeanpublic String getGtidSet()
BinlogReaderMetricsMXBeangetGtidSet in interface BinlogReaderMetricsMXBeanpublic boolean getIsGtidModeEnabled()
BinlogReaderMetricsMXBeangetIsGtidModeEnabled in interface BinlogReaderMetricsMXBeanpublic String getLastEvent()
getLastEvent in interface ChangeEventSourceMetricsMXBeangetLastEvent in class PipelineMetricspublic long getMilliSecondsSinceLastEvent()
getMilliSecondsSinceLastEvent in interface ChangeEventSourceMetricsMXBeangetMilliSecondsSinceLastEvent in class PipelineMetricspublic long getTotalNumberOfEventsSeen()
getTotalNumberOfEventsSeen in interface ChangeEventSourceMetricsMXBeangetTotalNumberOfEventsSeen in class PipelineMetricspublic long getNumberOfSkippedEvents()
BinlogReaderMetricsMXBeangetNumberOfSkippedEvents in interface BinlogReaderMetricsMXBeanpublic long getNumberOfDisconnects()
BinlogReaderMetricsMXBeangetNumberOfDisconnects in interface BinlogReaderMetricsMXBeanpublic void reset()
reset in interface ChangeEventSourceMetricsMXBeanreset in class PipelineMetricspublic long getNumberOfCommittedTransactions()
BinlogReaderMetricsMXBeangetNumberOfCommittedTransactions in interface BinlogReaderMetricsMXBeangetNumberOfCommittedTransactions in interface StreamingChangeEventSourceMetricsMXBeanpublic long getNumberOfRolledBackTransactions()
BinlogReaderMetricsMXBeangetNumberOfRolledBackTransactions in interface BinlogReaderMetricsMXBeanpublic long getNumberOfNotWellFormedTransactions()
BinlogReaderMetricsMXBeangetNumberOfNotWellFormedTransactions in interface BinlogReaderMetricsMXBeanpublic long getNumberOfLargeTransactions()
BinlogReaderMetricsMXBeanEventBuffer instance.getNumberOfLargeTransactions in interface BinlogReaderMetricsMXBeanpublic void onCommittedTransaction()
public void onRolledBackTransaction()
public void onNotWellFormedTransaction()
public void onLargeTransaction()
public void onGtidChange(String gtid)
public void setIsGtidModeEnabled(boolean enabled)
public void setMilliSecondsBehindSource(long value)
public String[] getMonitoredTables()
getMonitoredTables in interface ChangeEventSourceMetricsMXBeanpublic long getMilliSecondsBehindSource()
getMilliSecondsBehindSource in interface StreamingChangeEventSourceMetricsMXBeanpublic Map<String,String> getSourceEventPosition()
getSourceEventPosition in interface StreamingChangeEventSourceMetricsMXBeanpublic String getLastTransactionId()
getLastTransactionId in interface StreamingChangeEventSourceMetricsMXBeanCopyright © 2020 JBoss by Red Hat. All rights reserved.