-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[cdc-connector][cdc-base] Add SNAPSHOT mode #2901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
29b0522
6a39026
990bc5c
0579a61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,5 +30,6 @@ public enum StartupMode { | |
|
|
||
| SPECIFIC_OFFSETS, | ||
|
|
||
| TIMESTAMP | ||
| TIMESTAMP, | ||
| SNAPSHOT | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,6 @@ | |
| import javax.annotation.Nullable; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.Collections; | ||
| import java.util.HashMap; | ||
| import java.util.HashSet; | ||
| import java.util.Iterator; | ||
|
|
@@ -88,13 +87,18 @@ public void submitTask(FetchTask<SourceSplitBase> fetchTask) { | |
| try { | ||
| streamFetchTask.execute(taskContext); | ||
| } catch (Exception e) { | ||
| this.currentTaskRunning = false; | ||
| LOG.error( | ||
| String.format( | ||
| "Execute stream read task for stream split %s fail", | ||
| currentStreamSplit), | ||
| e); | ||
| readException = e; | ||
| } finally { | ||
| try { | ||
| stopReadTask(); | ||
| } catch (Exception e) { | ||
| throw new RuntimeException(e); | ||
| } | ||
|
Comment on lines
+96
to
+101
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why we need this change?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because the stream split is unbounded before this PR, we set |
||
| } | ||
| }); | ||
| } | ||
|
|
@@ -122,7 +126,7 @@ public Iterator<SourceRecords> pollSplitRecords() throws InterruptedException { | |
| sourceRecordsSet.add(new SourceRecords(sourceRecords)); | ||
| return sourceRecordsSet.iterator(); | ||
| } else { | ||
| return Collections.emptyIterator(); | ||
| return null; | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.