You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/12/23 02:33:25 UTC

[GitHub] [flink] zhuzhurk commented on a diff in pull request #21464: [FLINK-30334][runtime] Fix SourceCoordinator#handleRequestSplitEvent hasNoMoreSplits check not consider the hybridsource situation

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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org