Package io.debezium.pipeline.metrics
Class DefaultSnapshotChangeEventSourceMetrics<P extends Partition>
- java.lang.Object
-
- io.debezium.metrics.Metrics
-
- io.debezium.pipeline.metrics.PipelineMetrics<P>
-
- io.debezium.pipeline.metrics.DefaultSnapshotChangeEventSourceMetrics<P>
-
- All Implemented Interfaces:
ChangeEventSourceMetrics<P>,ChangeEventSourceMetricsMXBean,SnapshotChangeEventSourceMetrics<P>,SnapshotChangeEventSourceMetricsMXBean,CommonEventMetricsMXBean,QueueMetricsMXBean,SchemaMetricsMXBean,SnapshotMetricsMXBean,DataChangeEventListener<P>,SnapshotProgressListener<P>
@ThreadSafe public class DefaultSnapshotChangeEventSourceMetrics<P extends Partition> extends PipelineMetrics<P> implements SnapshotChangeEventSourceMetrics<P>, SnapshotChangeEventSourceMetricsMXBean
The default implementation of metrics related to the snapshot phase of a connector.- Author:
- Randall Hauch, Jiri Pechanec
-
-
Field Summary
Fields Modifier and Type Field Description private SnapshotMetersnapshotMeter-
Fields inherited from class io.debezium.pipeline.metrics.PipelineMetrics
metadataProvider, taskContext
-
-
Constructor Summary
Constructors Constructor Description DefaultSnapshotChangeEventSourceMetrics(T taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider)
-
Method Summary
-
Methods inherited from class io.debezium.pipeline.metrics.PipelineMetrics
getCurrentQueueSizeInBytes, getLastEvent, getMaxQueueSizeInBytes, getMilliSecondsSinceLastEvent, getNumberOfErroneousEvents, getNumberOfEventsFiltered, getQueueRemainingCapacity, getQueueTotalCapacity, getTotalNumberOfCreateEventsSeen, getTotalNumberOfDeleteEventsSeen, getTotalNumberOfEventsSeen, getTotalNumberOfUpdateEventsSeen, onConnectorEvent, onErroneousEvent, onErroneousEvent, onEvent, 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
onConnectorEvent, onErroneousEvent, onErroneousEvent, onEvent, onFilteredEvent, onFilteredEvent
-
Methods inherited from interface io.debezium.pipeline.metrics.traits.QueueMetricsMXBean
getCurrentQueueSizeInBytes, getMaxQueueSizeInBytes, getQueueRemainingCapacity, getQueueTotalCapacity
-
-
-
-
Field Detail
-
snapshotMeter
private final SnapshotMeter snapshotMeter
-
-
Constructor Detail
-
DefaultSnapshotChangeEventSourceMetrics
public DefaultSnapshotChangeEventSourceMetrics(T taskContext, ChangeEventQueueMetrics changeEventQueueMetrics, EventMetadataProvider metadataProvider)
-
-
Method Detail
-
getTotalTableCount
public int getTotalTableCount()
- Specified by:
getTotalTableCountin interfaceSnapshotMetricsMXBean
-
getRemainingTableCount
public int getRemainingTableCount()
- Specified by:
getRemainingTableCountin interfaceSnapshotMetricsMXBean
-
getSnapshotRunning
public boolean getSnapshotRunning()
- Specified by:
getSnapshotRunningin interfaceSnapshotMetricsMXBean
-
getSnapshotCompleted
public boolean getSnapshotCompleted()
- Specified by:
getSnapshotCompletedin interfaceSnapshotMetricsMXBean
-
getSnapshotAborted
public boolean getSnapshotAborted()
- Specified by:
getSnapshotAbortedin interfaceSnapshotMetricsMXBean
-
getSnapshotDurationInSeconds
public long getSnapshotDurationInSeconds()
- Specified by:
getSnapshotDurationInSecondsin interfaceSnapshotMetricsMXBean
-
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
-
monitoredDataCollectionsDetermined
public void monitoredDataCollectionsDetermined(P partition, Iterable<? extends DataCollectionId> dataCollectionIds)
- Specified by:
monitoredDataCollectionsDeterminedin interfaceSnapshotProgressListener<P extends Partition>
-
dataCollectionSnapshotCompleted
public void dataCollectionSnapshotCompleted(P partition, DataCollectionId dataCollectionId, long numRows)
- Specified by:
dataCollectionSnapshotCompletedin interfaceSnapshotProgressListener<P extends Partition>
-
snapshotStarted
public void snapshotStarted(P partition)
- Specified by:
snapshotStartedin interfaceSnapshotProgressListener<P extends Partition>
-
snapshotCompleted
public void snapshotCompleted(P partition)
- Specified by:
snapshotCompletedin interfaceSnapshotProgressListener<P extends Partition>
-
snapshotAborted
public void snapshotAborted(P partition)
- Specified by:
snapshotAbortedin interfaceSnapshotProgressListener<P extends Partition>
-
rowsScanned
public void rowsScanned(P partition, TableId tableId, long numRows)
- Specified by:
rowsScannedin interfaceSnapshotProgressListener<P extends Partition>
-
getRowsScanned
public ConcurrentMap<String,Long> getRowsScanned()
- Specified by:
getRowsScannedin interfaceSnapshotMetricsMXBean
-
currentChunk
public void currentChunk(P partition, String chunkId, Object[] chunkFrom, Object[] chunkTo)
- Specified by:
currentChunkin interfaceSnapshotProgressListener<P extends Partition>
-
currentChunk
public void currentChunk(P partition, String chunkId, Object[] chunkFrom, Object[] chunkTo, Object[] tableTo)
- Specified by:
currentChunkin interfaceSnapshotProgressListener<P extends Partition>
-
getChunkId
public String getChunkId()
- Specified by:
getChunkIdin interfaceSnapshotMetricsMXBean
-
getChunkFrom
public String getChunkFrom()
- Specified by:
getChunkFromin interfaceSnapshotMetricsMXBean
-
getChunkTo
public String getChunkTo()
- Specified by:
getChunkToin interfaceSnapshotMetricsMXBean
-
getTableFrom
public String getTableFrom()
- Specified by:
getTableFromin interfaceSnapshotMetricsMXBean
-
getTableTo
public String getTableTo()
- Specified by:
getTableToin interfaceSnapshotMetricsMXBean
-
reset
public void reset()
- Specified by:
resetin interfaceChangeEventSourceMetricsMXBean- Overrides:
resetin classPipelineMetrics<P extends Partition>
-
-