Class IncrementalSnapshotContext<T>
- java.lang.Object
-
- io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotContext<T>
-
@NotThreadSafe public class IncrementalSnapshotContext<T> extends Object
A class describing current state of incremental snapshot- Author:
- Jiri Pechanec
-
-
Field Summary
Fields Modifier and Type Field Description private Object[]
chunkEndPosition
The last primary key in chunk that is now in process.private String
currentChunkId
static String
DATA_COLLECTIONS_TO_SNAPSHOT_KEY
private Queue<T>
dataCollectionsToSnapshot
static String
EVENT_PRIMARY_KEY
static String
INCREMENTAL_SNAPSHOT_KEY
private Object[]
lastEventKeySent
The PK of the last record that was passed to Kafka Connect.private static org.slf4j.Logger
LOGGER
private Object[]
maximumKey
The largest PK in the table at the start of snapshot.static String
TABLE_MAXIMUM_KEY
private boolean
useCatalogBeforeSchema
private boolean
windowOpened
-
Constructor Summary
Constructors Constructor Description IncrementalSnapshotContext()
IncrementalSnapshotContext(boolean useCatalogBeforeSchema)
-
Method Summary
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
INCREMENTAL_SNAPSHOT_KEY
public static final String INCREMENTAL_SNAPSHOT_KEY
- See Also:
- Constant Field Values
-
DATA_COLLECTIONS_TO_SNAPSHOT_KEY
public static final String DATA_COLLECTIONS_TO_SNAPSHOT_KEY
- See Also:
- Constant Field Values
-
EVENT_PRIMARY_KEY
public static final String EVENT_PRIMARY_KEY
- See Also:
- Constant Field Values
-
TABLE_MAXIMUM_KEY
public static final String TABLE_MAXIMUM_KEY
- See Also:
- Constant Field Values
-
windowOpened
private boolean windowOpened
-
chunkEndPosition
private Object[] chunkEndPosition
The last primary key in chunk that is now in process.
-
useCatalogBeforeSchema
private final boolean useCatalogBeforeSchema
-
lastEventKeySent
private Object[] lastEventKeySent
The PK of the last record that was passed to Kafka Connect. In case of connector restart the start of the first chunk will be populated from it.
-
currentChunkId
private String currentChunkId
-
maximumKey
private Object[] maximumKey
The largest PK in the table at the start of snapshot.
-
-
Method Detail
-
openWindow
public boolean openWindow(String id)
-
closeWindow
public boolean closeWindow(String id)
-
deduplicationNeeded
public boolean deduplicationNeeded()
-
dataCollectionsToSnapshotAsString
private String dataCollectionsToSnapshotAsString()
-
snapshotRunning
protected boolean snapshotRunning()
-
addDataCollectionNamesToSnapshot
public List<T> addDataCollectionNamesToSnapshot(List<String> dataCollectionIds)
-
load
public static <U> IncrementalSnapshotContext<U> load(Map<String,?> offsets, boolean useCatalogBeforeSchema, Class<U> clazz)
-
load
public static <U> IncrementalSnapshotContext<U> load(Map<String,?> offsets, Class<U> clazz)
-
sendEvent
public void sendEvent(Object[] key)
-
currentDataCollectionId
public T currentDataCollectionId()
-
tablesToBeSnapshottedCount
public int tablesToBeSnapshottedCount()
-
nextChunkPosition
public void nextChunkPosition(Object[] end)
-
chunkEndPosititon
public Object[] chunkEndPosititon()
-
resetChunk
private void resetChunk()
-
isNonInitialChunk
public boolean isNonInitialChunk()
-
nextDataCollection
public T nextDataCollection()
-
startNewChunk
public void startNewChunk()
-
currentChunkId
public String currentChunkId()
-
maximumKey
public void maximumKey(Object[] key)
-
-