zhuzhurk commented on code in PR #21464:
URL: https://github.com/apache/flink/pull/21464#discussion_r1055064773


##########
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:
   Let's avoid adding this method to `SplitEnumeratorContext` which is a 
`@Public` interface.
   Intermediate noMoreSplits event is strictly related to HybridSource and is 
hard for users to understand or handle.
   
   I think we can just directly add the method to  `SourceCoordinatorContext`, 
then use `instanceOf` and type cast in `HybridSourceSplitEnumerator` to invoke 
this method.



-- 
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]

Reply via email to