danny0405 commented on code in PR #17872:
URL: https://github.com/apache/hudi/pull/17872#discussion_r2693204242
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/reader/HoodieSourceSplitReader.java:
##########
@@ -67,15 +70,27 @@ public HoodieSourceSplitReader(
@Override
public RecordsWithSplitIds<HoodieRecordWithPosition<T>> fetch() throws
IOException {
- HoodieSourceSplit nextSplit = splits.poll();
- if (nextSplit != null) {
- currentSplit = nextSplit;
- currentSplitId = nextSplit.splitId();
- return readerFunction.read(currentSplit);
+ if (currentReader == null) {
+ HoodieSourceSplit nextSplit = splits.poll();
+ if (nextSplit != null) {
+ currentSplit = nextSplit;
+ currentSplitId = nextSplit.splitId();
+ currentReader = readerFunction.read(currentSplit);
Review Comment:
is the `#fetch` executes in series with the reader task checkpoint? Is the
`RecordsWithSplitIds` stored within the flink state? looks like the
`RecordsWithSplitIds` can already represents a set of records from multiple
splits.
Is the records in `currentReader` can be recovered for a task failover?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]