public class SnapshotSplitReader extends Object implements DebeziumReader<org.apache.kafka.connect.source.SourceRecord,MySqlSplit>
| Modifier and Type | Class and Description |
|---|---|
class |
SnapshotSplitReader.SnapshotBinlogSplitChangeEventSourceContextImpl
The
ChangeEventSource.ChangeEventSourceContext implementation for bounded binlog task
of a snapshot split task. |
class |
SnapshotSplitReader.SnapshotSplitChangeEventSourceContextImpl
ChangeEventSource.ChangeEventSourceContext implementation that keeps low/high
watermark for each MySqlSnapshotSplit. |
| Modifier and Type | Field and Description |
|---|---|
AtomicBoolean |
hasNextElement |
AtomicBoolean |
reachEnd |
| Constructor and Description |
|---|
SnapshotSplitReader(StatefulTaskContext statefulTaskContext,
int subtaskId) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the reader and releases all resources.
|
boolean |
isFinished()
Return the current split of the reader is finished or not.
|
Iterator<org.apache.kafka.connect.source.SourceRecord> |
pollSplitRecords()
Reads records from MySQL.
|
void |
submitSplit(MySqlSplit mySqlSplit)
Add to split to read, this should call only the when reader is idle.
|
public AtomicBoolean hasNextElement
public AtomicBoolean reachEnd
public SnapshotSplitReader(StatefulTaskContext statefulTaskContext, int subtaskId)
public void submitSplit(MySqlSplit mySqlSplit)
DebeziumReadersubmitSplit in interface DebeziumReader<org.apache.kafka.connect.source.SourceRecord,MySqlSplit>public boolean isFinished()
DebeziumReaderisFinished in interface DebeziumReader<org.apache.kafka.connect.source.SourceRecord,MySqlSplit>@Nullable public Iterator<org.apache.kafka.connect.source.SourceRecord> pollSplitRecords() throws InterruptedException
DebeziumReaderIterator will be returned if the data of split is on pulling.pollSplitRecords in interface DebeziumReader<org.apache.kafka.connect.source.SourceRecord,MySqlSplit>InterruptedExceptionpublic void close()
DebeziumReaderclose in interface DebeziumReader<org.apache.kafka.connect.source.SourceRecord,MySqlSplit>Copyright © 2022 The Apache Software Foundation. All rights reserved.