This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new 17b805bc9af [FLINK-30802][connectors] Document that 
SplitReader#fetch() may interrupt&resume
17b805bc9af is described below

commit 17b805bc9afcca8776a46c15c3785d9df067ec7e
Author: Etienne Chauchot <[email protected]>
AuthorDate: Tue Mar 14 12:30:30 2023 +0100

    [FLINK-30802][connectors] Document that SplitReader#fetch() may 
interrupt&resume
---
 .../flink/connector/base/source/reader/splitreader/SplitReader.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/splitreader/SplitReader.java
 
b/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/splitreader/SplitReader.java
index 888555d2b97..212232b5154 100644
--- 
a/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/splitreader/SplitReader.java
+++ 
b/flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/splitreader/SplitReader.java
@@ -41,7 +41,10 @@ public interface SplitReader<E, SplitT extends SourceSplit> 
extends AutoCloseabl
      * implementation may either decide to return without throwing an 
exception, or it can just
      * throw an interrupted exception. In either case, this method should be 
reentrant, meaning that
      * the next fetch call should just resume from where the last fetch call 
was waken up or
-     * interrupted.
+     * interrupted. It is up to the implementer to either read all the records 
of the split or to
+     * stop reading them at some point (for example when a given threshold is 
exceeded). In that
+     * later case, when fetch is called again, the reading should restart at 
the record where it
+     * left off based on the {@code SplitState}.
      *
      * @return the Ids of the finished splits.
      * @throws IOException when encountered IO errors, such as deserialization 
failures.

Reply via email to