zhuzhurk commented on code in PR #21464:
URL: https://github.com/apache/flink/pull/21464#discussion_r1056106649
##########
flink-core/src/main/java/org/apache/flink/api/connector/source/SplitEnumeratorContext.java:
##########
@@ -126,6 +126,16 @@ default void assignSplit(SplitT split, int subtask) {
*/
void signalNoMoreSplits(int subtask);
+ /**
+ * Signals a subtask that it will not receive split for current source,
but it will receive
+ * split for next sources. A common scenario is HybridSource. This
indicates that task not truly
+ * read finished.
+ *
+ * @param subtask The index of the operator's parallel subtask that shall
be signaled it will
+ * receive splits later.
+ */
+ default void signalIntermediateNoMoreSplits(int subtask) {}
Review Comment:
I think we can add an interface in `flink-core`, e.g.
```
@Internal
interface SupportsIntermediateNoMoreSplits {
void signalIntermediateNoMoreSplits(int subtask);
}
```
`SourceCoordinatorContext` should implements it. And
`HybridSourceSplitEnumerator` should check that the realContext is an instance
of `SupportsIntermediateNoMoreSplits`.
##########
flink-core/src/main/java/org/apache/flink/api/connector/source/SplitEnumeratorContext.java:
##########
@@ -126,6 +126,16 @@ default void assignSplit(SplitT split, int subtask) {
*/
void signalNoMoreSplits(int subtask);
+ /**
+ * Signals a subtask that it will not receive split for current source,
but it will receive
+ * split for next sources. A common scenario is HybridSource. This
indicates that task not truly
+ * read finished.
+ *
+ * @param subtask The index of the operator's parallel subtask that shall
be signaled it will
+ * receive splits later.
+ */
+ default void signalIntermediateNoMoreSplits(int subtask) {}
Review Comment:
I think we can add an interface in `flink-core`, e.g.
```
@Internal
interface SupportsIntermediateNoMoreSplits {
void signalIntermediateNoMoreSplits(int subtask);
}
```
`SourceCoordinatorContext` should implement it. And
`HybridSourceSplitEnumerator` should check that the realContext is an instance
of `SupportsIntermediateNoMoreSplits`.
--
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]