Package io.debezium.pipeline.metrics
Class DefaultStreamingChangeEventSourceMetrics<P extends Partition>
- java.lang.Object
-
- io.debezium.metrics.Metrics
-
- io.debezium.pipeline.metrics.PipelineMetrics<P>
-
- io.debezium.pipeline.metrics.DefaultStreamingChangeEventSourceMetrics<P>
-
- All Implemented Interfaces:
ChangeEventSourceMetrics<P>,ChangeEventSourceMetricsMXBean,StreamingChangeEventSourceMetrics<P>,StreamingChangeEventSourceMetricsMXBean,CommonEventMetricsMXBean,ConnectionMetricsMXBean,QueueMetricsMXBean,SchemaMetricsMXBean,StreamingMetricsMXBean,DataChangeEventListener<P>,StreamingProgressListener
@ThreadSafe public class DefaultStreamingChangeEventSourceMetrics<P extends Partition> extends PipelineMetrics<P> implements StreamingChangeEventSourceMetrics<P>, StreamingChangeEventSourceMetricsMXBean
The default implementation of metrics related to the streaming phase of a connector.- Author:
- Randall Hauch, Jiri Pechanec
-
-
Field Summary
Fields Modifier and Type Field Description private ConnectionMeterconnectionMeterprivate StreamingMeterstreamingMeter-
Fields inherited from class io.debezium.pipeline.metrics.PipelineMetrics
metadataProvider, taskContext
-
-
Constructor Summary
Constructors Constructor Description DefaultStreamingChangeEventSourceMetrics(T taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidconnected(boolean connected)String[]getCapturedTables()StringgetLastTransactionId()longgetMilliSecondsBehindSource()String[]getMonitoredTables()Deprecated.Superseded by the 'Captured Tables' metric.longgetNumberOfCommittedTransactions()Map<String,String>getSourceEventPosition()booleanisConnected()voidonConnectorEvent(P partition, ConnectorEvent event)Invoked for events that represent a connector event.voidonEvent(P partition, DataCollectionId source, OffsetContext offset, Object key, org.apache.kafka.connect.data.Struct value, Envelope.Operation operation)Invoked if an event is processed for a captured table.voidreset()-
Methods inherited from class io.debezium.pipeline.metrics.PipelineMetrics
getCurrentQueueSizeInBytes, getLastEvent, getMaxQueueSizeInBytes, getMilliSecondsSinceLastEvent, getNumberOfErroneousEvents, getNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacity, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfEventsSeen, getTotalNumberOfUpdateEventsSeen, onErroneousEvent, onErroneousEvent, onFilteredEvent, onFilteredEvent
-
Methods inherited from class io.debezium.metrics.Metrics
metricName, metricName, register, unregister
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.debezium.pipeline.metrics.ChangeEventSourceMetrics
register, unregister
-
Methods inherited from interface io.debezium.pipeline.metrics.traits.CommonEventMetricsMXBean
getLastEvent, getMilliSecondsSinceLastEvent, getNumberOfErroneousEvents, getNumberOfEventsFiltered, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfEventsSeen, getTotalNumberOfUpdateEventsSeen
-
Methods inherited from interface io.debezium.pipeline.source.spi.DataChangeEventListener
onErroneousEvent, onErroneousEvent, onFilteredEvent, onFilteredEvent
-
Methods inherited from interface io.debezium.pipeline.metrics.traits.QueueMetricsMXBean
getCurrentQueueSizeInBytes, getMaxQueueSizeInBytes, getQueueRemainingCapacity, getQueueTotalCapacity
-
-
-
-
Field Detail
-
connectionMeter
private final ConnectionMeter connectionMeter
-
streamingMeter
private final StreamingMeter streamingMeter
-
-
Constructor Detail
-
DefaultStreamingChangeEventSourceMetrics
public DefaultStreamingChangeEventSourceMetrics(T taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider)
-
-
Method Detail
-
isConnected
public boolean isConnected()
- Specified by:
isConnectedin interfaceConnectionMetricsMXBean
-
getMonitoredTables
@Deprecated public String[] getMonitoredTables()
Deprecated.Superseded by the 'Captured Tables' metric. UsegetCapturedTables(). Scheduled for removal in a future release.- Specified by:
getMonitoredTablesin interfaceChangeEventSourceMetricsMXBean
-
getCapturedTables
public String[] getCapturedTables()
- Specified by:
getCapturedTablesin interfaceSchemaMetricsMXBean- Specified by:
getCapturedTablesin interfaceStreamingMetricsMXBean
-
connected
public void connected(boolean connected)
- Specified by:
connectedin interfaceStreamingProgressListener
-
getSourceEventPosition
public Map<String,String> getSourceEventPosition()
- Specified by:
getSourceEventPositionin interfaceStreamingMetricsMXBean
-
getMilliSecondsBehindSource
public long getMilliSecondsBehindSource()
- Specified by:
getMilliSecondsBehindSourcein interfaceStreamingMetricsMXBean
-
getNumberOfCommittedTransactions
public long getNumberOfCommittedTransactions()
- Specified by:
getNumberOfCommittedTransactionsin interfaceStreamingMetricsMXBean
-
onEvent
public void onEvent(P partition, DataCollectionId source, OffsetContext offset, Object key, org.apache.kafka.connect.data.Struct value, Envelope.Operation operation)
Description copied from interface:DataChangeEventListenerInvoked if an event is processed for a captured table.- Specified by:
onEventin interfaceDataChangeEventListener<P extends Partition>- Overrides:
onEventin classPipelineMetrics<P extends Partition>
-
onConnectorEvent
public void onConnectorEvent(P partition, ConnectorEvent event)
Description copied from interface:DataChangeEventListenerInvoked for events that represent a connector event.- Specified by:
onConnectorEventin interfaceDataChangeEventListener<P extends Partition>- Overrides:
onConnectorEventin classPipelineMetrics<P extends Partition>
-
getLastTransactionId
public String getLastTransactionId()
- Specified by:
getLastTransactionIdin interfaceStreamingMetricsMXBean
-
reset
public void reset()
- Specified by:
resetin interfaceChangeEventSourceMetricsMXBean- Overrides:
resetin classPipelineMetrics<P extends Partition>
-
-