becketqin opened a new pull request #10487: [FLINK-15100][connector/source] Add 
a base implementation for SourceReader.
URL: https://github.com/apache/flink/pull/10487
 
 
   ## What is the purpose of the change
   This patch assumes the existence of #10486 . This patch adds a [base 
implementation of Source 
API](https://cwiki.apache.org/confluence/display/FLINK/FLIP-27%3A+Refactor+Source+Interface#FLIP-27:RefactorSourceInterface-PublicinterfacefrombaseSourceimplementation)
 mentioned in FLIP-27. 
   
   The base implementation provides a flexible threading model for the 
`SourceReaders`. It further divide the work of a `SourceReader` into 
`SplitReader` and `RecordEmitter`. So the source developers can focus on 
reading the raw records and converting them for downstream processing.
   
   ## Brief change log
   Add the base implementation of `SourceReader`. The base implementation 
introduces a few user facing interfaces:
   The user facing interface include:
   - SplitReader - The stateless and thread-less high level reader which is 
only responsible for reading raw records of type <E> from the assigned splits.
   - SplitChange - The split change to the split reader. Right now there is 
only one subclass which is SplitAddition.
   - RecordsWithSplitIds - A container class holding the raw records of type 
<E> read by SplitReader.
   - RecordEmitter - A class that takes the raw records of type <E> returned by 
the SplitReader, convert them into the final record type <T> and emit them into 
the SourceOutput.
   
   ## Verifying this change
   
   This change added tests and can be verified in the 
`org.apache.flink.api.connector.source.reader.SourceReaderBaseTest`.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes)
     - The serializers: (yes )
     - The runtime per-record code paths (performance sensitive): (yes)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (JavaDocs, 
[FLIP-27](https://cwiki.apache.org/confluence/display/FLINK/FLIP-27%3A+Refactor+Source+Interface))
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to