GitHub user zhijiangW opened a pull request: https://github.com/apache/flink/pull/6417
[FLINK-9913][runtime] Improve output serialization only once in RecordWriter ## What is the purpose of the change *This pull request improves the output serialization only once for multi target channels in `RecordWriter`, rather than serialization as many times as the number of selected channels. ## Brief change log - *Only one `RecordSerializer` is created for all the output channels in `RecordWriter`* - *Restructure the processes of `emit`, `broadcastEmit`, randomEmit` in `RecordWriter`* - *Restructure the interface methods in `RecordSerializer`* ## Verifying this change This change is already covered by existing tests, such as *SpanningRecordSerializationTest*, etc. And adds new tests in `RecordWriterTest` to verify: - *The serialization results are correct by `RecordWriter#emit` with `BroadcastPartitioner`* - *The serialization results are correct by `RecordWriter#broadcastEmit` directly* ## 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)`: (no) - 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: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable) You can merge this pull request into a Git repository by running: $ git pull https://github.com/zhijiangW/flink FLINK-9913 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/6417.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #6417 ---- commit 109ddb37abafcea28478b90cda10b965e0c399d5 Author: Zhijiang <wangzhijiang999@...> Date: 2018-07-25T05:45:23Z [FLINK-9913][runtime] Improve output serialization only once in RecordWriter ---- ---