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 ConnectionMeter
connectionMeter
private StreamingMeter
streamingMeter
-
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 void
connected(boolean connected)
String[]
getCapturedTables()
String
getLastTransactionId()
long
getMilliSecondsBehindSource()
String[]
getMonitoredTables()
Deprecated.Superseded by the 'Captured Tables' metric.long
getNumberOfCommittedTransactions()
Map<String,String>
getSourceEventPosition()
boolean
isConnected()
void
onConnectorEvent(P partition, ConnectorEvent event)
Invoked for events that represent a connector event.void
onEvent(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.void
reset()
-
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:
isConnected
in interfaceConnectionMetricsMXBean
-
getMonitoredTables
@Deprecated public String[] getMonitoredTables()
Deprecated.Superseded by the 'Captured Tables' metric. UsegetCapturedTables()
. Scheduled for removal in a future release.- Specified by:
getMonitoredTables
in interfaceChangeEventSourceMetricsMXBean
-
getCapturedTables
public String[] getCapturedTables()
- Specified by:
getCapturedTables
in interfaceSchemaMetricsMXBean
-
connected
public void connected(boolean connected)
- Specified by:
connected
in interfaceStreamingProgressListener
-
getSourceEventPosition
public Map<String,String> getSourceEventPosition()
- Specified by:
getSourceEventPosition
in interfaceStreamingMetricsMXBean
-
getMilliSecondsBehindSource
public long getMilliSecondsBehindSource()
- Specified by:
getMilliSecondsBehindSource
in interfaceStreamingMetricsMXBean
-
getNumberOfCommittedTransactions
public long getNumberOfCommittedTransactions()
- Specified by:
getNumberOfCommittedTransactions
in 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:DataChangeEventListener
Invoked if an event is processed for a captured table.- Specified by:
onEvent
in interfaceDataChangeEventListener<P extends Partition>
- Overrides:
onEvent
in classPipelineMetrics<P extends Partition>
-
onConnectorEvent
public void onConnectorEvent(P partition, ConnectorEvent event)
Description copied from interface:DataChangeEventListener
Invoked for events that represent a connector event.- Specified by:
onConnectorEvent
in interfaceDataChangeEventListener<P extends Partition>
- Overrides:
onConnectorEvent
in classPipelineMetrics<P extends Partition>
-
getLastTransactionId
public String getLastTransactionId()
- Specified by:
getLastTransactionId
in interfaceStreamingMetricsMXBean
-
reset
public void reset()
- Specified by:
reset
in interfaceChangeEventSourceMetricsMXBean
- Overrides:
reset
in classPipelineMetrics<P extends Partition>
-
-