-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature][Core] Support cdc task ddl restore for zeta #7463
base: dev
Are you sure you want to change the base?
Conversation
23d99f9
to
9d7d79f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seem lack test case. Shall we add some?
For example, read updated/deleted column data to unsupported transform/sink, what's will happen?
And read table -> savepoint -> update column -> restore? I think the change will solve the problem of this scenario. But we need test case.
seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SinkWriter.java
Show resolved
Hide resolved
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public interface ChangeStreamTableSourceFactory extends TableSourceFactory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's meaning of ChangeStreamTable
? CDC?
Any introduce of why we should add this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.g. CDC/MQ Source The factory can be used to restore the source state from the checkpoint
|
||
import java.io.IOException; | ||
|
||
public interface SupportSchemaEvolutionSinkWriter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this interface extend SinkWriter to reduce the amount of interface for the implementing class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DDL should have an independent interface, and the connector can choose to support it, and use test cases to detect whether the user has implemented it correctly.
Other than that, I don't think of a better way. Using extends classes is more difficult to maintain.
|
||
@Override | ||
public List<SchemaChangeType> supports() { | ||
SeaTunnelSink firstSink = sinks.entrySet().iterator().next().getValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sink action may include different kinds of sink, if the first sink that do not support SupportSchemaEvolutionSink and other support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For MultiTableSink it should only contain sinks of the same kind
cc @Hisoka-X
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For MultiTableSink it should only contain sinks of the same kind
Right for now.
Added |
@hailin0 hi, I think this part needs a design to help me understand the whole process |
2a26cea
to
1bf5812
Compare
550ff5f
to
fbb5e10
Compare
fbb5e10
to
262b77b
Compare
262b77b
to
32e3bae
Compare
af42692
to
5ae5961
Compare
5ae5961
to
fc72bf6
Compare
4ba4c76
to
30c44a9
Compare
30c44a9
to
e5e63b8
Compare
|
|
||
@Override | ||
public List<SchemaChangeType> supports() { | ||
SeaTunnelSink firstSink = sinks.entrySet().iterator().next().getValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For MultiTableSink it should only contain sinks of the same kind
Right for now.
...ient/src/main/java/org/apache/seatunnel/engine/client/job/ClientJobExecutionEnvironment.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. cc @dailai for a look
Purpose of this pull request
[Improve][CDC] Improve cdc task state restore for zeta
Does this PR introduce any user-facing change?
No
How was this patch tested?
Added
https://github.com/apache/seatunnel/pull/7463/files#diff-56c06c7dde242a3733bec78c1d71f5a32baa3530be2c8f336e28de7e390312a8
Check list
New License Guide
release-note
.