wsry opened a new pull request #13447:
URL: https://github.com/apache/flink/pull/13447
## What is the purpose of the change
Currently, ResultPartitionWriter is buffer-oriented, that is, RecordWriter
will add buffer of different channels to ResultPartitionWriter and the buffer
boundary serves as a nature boundary of data belonging to different channels.
However, this abstraction is not flexible enough to handle some cases where
records are appended a joint-structure shared by all channels and sorting is
used to cluster data belonging to different channels.
This PR makes ResultPartitionWriter record-oriented which offers more
flexibility to the implementation of ResultPartitionWriter. And based on the
new record-oriented Interface, we will introduce the sort-merge based blocking
shuffle to Flink in the future.
## Brief change log
- commit 1eae320: [FLINK-19320][task] Removes RecordWriter#clearBuffers
and the corresponding test cases.
- commit 352dd89: [hotfix] Remove outdated description of RecordWriter.
- commit c5c7396: [FLINK-19312][network] Introduce
BufferWritingResultPartition which wraps the ResultSubpartition related logic
- commit 289b2f0: [FLINK-19297][network] Make ResultPartitionWriter
record-oriented
- commit 5bb6c93: [hotfix] Remove unused
RecordWriterTest#TrackingBufferRecycler
- commit 720849b: [FLINK-19302][network] Fix issue of flushing
BoundedBlockingResultPartition
- commit d4a56d8: [FLINK-19323][network] Small optimization of
RecordWriter#serializeRecord
## Verifying this change
This change is verified by both existing tests and new added tests.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / **no**)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (yes / **no**)
- The serializers: (**yes** / no / don't know)
- The runtime per-record code paths (performance sensitive): (**yes** / no
/ don't know)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** /
don't know)
- The S3 file system connector: (yes / **no** / don't know)
## Documentation
- Does this pull request introduce a new feature? (yes / **no**)
- If yes, how is the feature documented? (**not applicable** / docs /
JavaDocs / not documented)
----------------------------------------------------------------
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]