Class BinlogReaderMetrics
java.lang.Object
io.debezium.metrics.Metrics
io.debezium.pipeline.metrics.PipelineMetrics
io.debezium.connector.mysql.legacy.BinlogReaderMetrics
- All Implemented Interfaces:
BinlogReaderMetricsMXBean,ChangeEventSourceMetricsMXBean,StreamingChangeEventSourceMetricsMXBean,CommonEventMetricsMXBean,ConnectionMetricsMXBean,QueueMetricsMXBean,SchemaMetricsMXBean,StreamingMetricsMXBean,DataChangeEventListener
- Author:
- Randall Hauch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.github.shyiko.mysql.binlog.BinaryLogClientprivate final AtomicBooleanprivate final AtomicReference<String>private final AtomicLongprivate final AtomicLongprivate final AtomicLongprivate final AtomicLongprivate final AtomicLongprivate final MySqlSchemaprivate final com.github.shyiko.mysql.binlog.jmx.BinaryLogClientStatisticsFields inherited from class io.debezium.pipeline.metrics.PipelineMetrics
metadataProvider, taskContext -
Constructor Summary
ConstructorsConstructorDescriptionBinlogReaderMetrics(com.github.shyiko.mysql.binlog.BinaryLogClient client, MySqlTaskContext taskContext, String name, ChangeEventQueueMetrics changeEventQueueMetrics) -
Method Summary
Modifier and TypeMethodDescriptionName of the current MySQL binlog file being read by underlying mysql-binlog-client.longCurrent MySQL binlog offset position being read by underlying mysql-binlog-client.String[]Current MySQL Gtid being read by underlying mysql-binlog-client.booleanTracks if the connector is running using Gtids to track current offset.longlongString[]Deprecated.Superseded by the 'Captured Tables' metric.longTracks the number of committed transactions.longTracks the number of times the underlying mysql-binlog-client has been disconnected from MySQL.longTracks the number of transaction which contains events that contained more entries than could be contained within the connectors instance.longTracks the number of transactions which are not well-formed.longTracks the number of rolled back transactions.longTracks the number of events skipped by underlying mysql-binlog-client, generally due to the client being unable to properly deserialize the event.longbooleanvoidvoidonGtidChange(String gtid) voidvoidvoidvoidreset()voidsetIsGtidModeEnabled(boolean enabled) voidsetMilliSecondsBehindSource(long value) Methods inherited from class io.debezium.pipeline.metrics.PipelineMetrics
getCurrentQueueSizeInBytes, getMaxQueueSizeInBytes, getNumberOfErroneousEvents, getNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacity, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfUpdateEventsSeen, onConnectorEvent, onErroneousEvent, onErroneousEvent, onEvent, 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, toString, wait, wait, waitMethods inherited from interface io.debezium.pipeline.metrics.traits.CommonEventMetricsMXBean
getNumberOfErroneousEvents, getNumberOfEventsFiltered, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfUpdateEventsSeenMethods inherited from interface io.debezium.pipeline.metrics.traits.QueueMetricsMXBean
getCurrentQueueSizeInBytes, getMaxQueueSizeInBytes, getQueueRemainingCapacity, getQueueTotalCapacity
-
Field Details
-
client
private final com.github.shyiko.mysql.binlog.BinaryLogClient client -
stats
private final com.github.shyiko.mysql.binlog.jmx.BinaryLogClientStatistics stats -
schema
-
numberOfCommittedTransactions
-
numberOfRolledBackTransactions
-
numberOfNotWellFormedTransactions
-
numberOfLargeTransactions
-
isGtidModeEnabled
-
milliSecondsBehindMaster
-
lastTransactionId
-
-
Constructor Details
-
BinlogReaderMetrics
public BinlogReaderMetrics(com.github.shyiko.mysql.binlog.BinaryLogClient client, MySqlTaskContext taskContext, String name, ChangeEventQueueMetrics changeEventQueueMetrics)
-
-
Method Details
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceConnectionMetricsMXBean
-
getBinlogFilename
Description copied from interface:BinlogReaderMetricsMXBeanName of the current MySQL binlog file being read by underlying mysql-binlog-client.- Specified by:
getBinlogFilenamein interfaceBinlogReaderMetricsMXBean
-
getBinlogPosition
public long getBinlogPosition()Description copied from interface:BinlogReaderMetricsMXBeanCurrent MySQL binlog offset position being read by underlying mysql-binlog-client.- Specified by:
getBinlogPositionin interfaceBinlogReaderMetricsMXBean
-
getGtidSet
Description copied from interface:BinlogReaderMetricsMXBeanCurrent MySQL Gtid being read by underlying mysql-binlog-client.- Specified by:
getGtidSetin interfaceBinlogReaderMetricsMXBean
-
getIsGtidModeEnabled
public boolean getIsGtidModeEnabled()Description copied from interface:BinlogReaderMetricsMXBeanTracks if the connector is running using Gtids to track current offset.- Specified by:
getIsGtidModeEnabledin interfaceBinlogReaderMetricsMXBean- Returns:
- true if using Gtids, false if not.
-
getLastEvent
- Specified by:
getLastEventin interfaceCommonEventMetricsMXBean- Overrides:
getLastEventin classPipelineMetrics
-
getMilliSecondsSinceLastEvent
public long getMilliSecondsSinceLastEvent()- Specified by:
getMilliSecondsSinceLastEventin interfaceCommonEventMetricsMXBean- Overrides:
getMilliSecondsSinceLastEventin classPipelineMetrics
-
getTotalNumberOfEventsSeen
public long getTotalNumberOfEventsSeen()- Specified by:
getTotalNumberOfEventsSeenin interfaceCommonEventMetricsMXBean- Overrides:
getTotalNumberOfEventsSeenin classPipelineMetrics
-
getNumberOfSkippedEvents
public long getNumberOfSkippedEvents()Description copied from interface:BinlogReaderMetricsMXBeanTracks the number of events skipped by underlying mysql-binlog-client, generally due to the client being unable to properly deserialize the event.- Specified by:
getNumberOfSkippedEventsin interfaceBinlogReaderMetricsMXBean
-
getNumberOfDisconnects
public long getNumberOfDisconnects()Description copied from interface:BinlogReaderMetricsMXBeanTracks the number of times the underlying mysql-binlog-client has been disconnected from MySQL.- Specified by:
getNumberOfDisconnectsin interfaceBinlogReaderMetricsMXBean
-
reset
public void reset()- Specified by:
resetin interfaceChangeEventSourceMetricsMXBean- Overrides:
resetin classPipelineMetrics
-
getNumberOfCommittedTransactions
public long getNumberOfCommittedTransactions()Description copied from interface:BinlogReaderMetricsMXBeanTracks the number of committed transactions.- Specified by:
getNumberOfCommittedTransactionsin interfaceBinlogReaderMetricsMXBean- Specified by:
getNumberOfCommittedTransactionsin interfaceStreamingMetricsMXBean
-
getNumberOfRolledBackTransactions
public long getNumberOfRolledBackTransactions()Description copied from interface:BinlogReaderMetricsMXBeanTracks the number of rolled back transactions.- Specified by:
getNumberOfRolledBackTransactionsin interfaceBinlogReaderMetricsMXBean
-
getNumberOfNotWellFormedTransactions
public long getNumberOfNotWellFormedTransactions()Description copied from interface:BinlogReaderMetricsMXBeanTracks the number of transactions which are not well-formed. Example - The connector sees a commit TX event without a matched begin TX event.- Specified by:
getNumberOfNotWellFormedTransactionsin interfaceBinlogReaderMetricsMXBean
-
getNumberOfLargeTransactions
public long getNumberOfLargeTransactions()Description copied from interface:BinlogReaderMetricsMXBeanTracks the number of transaction which contains events that contained more entries than could be contained within the connectors instance.- Specified by:
getNumberOfLargeTransactionsin interfaceBinlogReaderMetricsMXBean
-
onCommittedTransaction
public void onCommittedTransaction() -
onRolledBackTransaction
public void onRolledBackTransaction() -
onNotWellFormedTransaction
public void onNotWellFormedTransaction() -
onLargeTransaction
public void onLargeTransaction() -
onGtidChange
-
setIsGtidModeEnabled
public void setIsGtidModeEnabled(boolean enabled) -
setMilliSecondsBehindSource
public void setMilliSecondsBehindSource(long value) -
getMonitoredTables
Deprecated.Superseded by the 'Captured Tables' metric. UsegetCapturedTables(). Scheduled for removal in a future release.- Specified by:
getMonitoredTablesin interfaceChangeEventSourceMetricsMXBean
-
getCapturedTables
- Specified by:
getCapturedTablesin interfaceSchemaMetricsMXBean
-
getMilliSecondsBehindSource
public long getMilliSecondsBehindSource()- Specified by:
getMilliSecondsBehindSourcein interfaceStreamingMetricsMXBean
-
getSourceEventPosition
- Specified by:
getSourceEventPositionin interfaceStreamingMetricsMXBean
-
getLastTransactionId
- Specified by:
getLastTransactionIdin interfaceStreamingMetricsMXBean
-