-
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
[DISCUSS][New API][WIP] Some code suggestion #2127
Comments
@ashulin Hi, PTAL |
|
I agree with you. In current usage scenarios, it's serialization is not required. |
You have a point there. At the moment, the name is lead to ambiguity. You're welcome to contribute it. |
|
In my option, |
OK. We can do it this way for now. |
The To avoid ambiguity, we can add public interface SourceSplitState {
SourceSplit toSplit();
} and |
Now I see what you mean. If so, in my opinion, there is a solution that may help.
So does |
@lhyundeadsoul You can see the |
1. class name of SeaTunnelRuntimeEnvironment changes to SeaTunnelContextAware 2. Serializer doesn't need to extend Serializable 3. unify Enumerator concept
1. class name of SeaTunnelRuntimeEnvironment changes to SeaTunnelContextAware 2. Serializer doesn't need to extend Serializable 3. unify Enumerator concept
Close by #2144 |
Code of Conduct
Search before asking
Describe the proposal
There are some code suggestions for implementing the
new connector api
. These may help make the code more understandable, unambiguous, and reasonable.Please let me know if I didn't understand the code design exactly. Thx.
Task list
SingleSplitReaderContext
SingleSplitReaderContext
to extendSourceReader.Context
rather than composition?SeaTunnelRuntimeEnvironment
xxxAware
is a better class name when there is only onesetXXX
method.Refer to
spring framewok
org.springframework.web.context.ServletConfigAware
,org.springframework.context.ApplicationContextAware
org.apache.seatunnel.api.source.SourceSplitEnumerator.Context
registeredReaders
,assignSplit(int, java.util.List<SplitT>)
andsignalNoMoreSplits(int subtask)
seems belong toSplitEnumerator
behavior, not theContext
(context can only support execution environment information I think)registeredReaders
's return type isSet<Integer>
, how aboutSet<SourceReader>
org.apache.seatunnel.api.serialization.Serializer
org.apache.seatunnel.api.source.SourceReader
org.apache.seatunnel.api.source.SourceReader.Context#sendSourceEventToCoordinator
DoesCoordinator
meansSourceSplitEnumerator
here? If so, we'd better unify the concept name in all occurences.org.apache.seatunnel.api.source.SourceReader#snapshotState
looks similar withorg.apache.seatunnel.api.source.SourceSplitEnumerator#snapshotState
, but return a different type(List<SplitT>
andStateT
), the comments issplit checkpoint state.
while actually it returnsList<SplitT>
, they are not same in my mind. Could we have a chance to unify the snapshot behavior?Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: