[jira] [Created] (FLINK-12564) Remove getBufferProvider method from ResultPartitionWriter interface

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-12564) Remove getBufferProvider method from ResultPartitionWriter interface

Shang Yuanchun (Jira)
zhijiang created FLINK-12564:
--------------------------------

             Summary: Remove getBufferProvider method from ResultPartitionWriter interface
                 Key: FLINK-12564
                 URL: https://issues.apache.org/jira/browse/FLINK-12564
             Project: Flink
          Issue Type: Sub-task
          Components: Runtime / Network
            Reporter: zhijiang
            Assignee: zhijiang


Currently `ResultPartitionWriter#getBufferProvider` is used for requesting `BufferBuilder` in `RecordWriter`, then the `BufferConsumer` created from `BufferBuilder` is added into `ResultPartitionWriter` via `addBufferConsumer` method.

We could merge these two methods in `ResultPartitionWriter` in order not to expose `getBufferProvider`. `ResultPartitionWriter` could internally request `BufferBuilder` and  add the created `BufferConsumer` into one sub partition, then return the `BufferBuilder` for `RecordWriter` writing serialized data.

Since we also change the `ResultPartitionWriter#addBufferConsumer` to `ResultPartitionWriter#requestBufferBuilder`, then another new method `ResultPartitionWriter#broadcastEvents` should be introduced for handling the case of events.

In future it might worth further abstracting the `ResultPartitionWriter` to be not only related to  `BufferBuilder`. We could provide `writeRecord(int targetIndex)` to replace `requestBufferBuilder`, then the serialization process could be done inside specific `ResultPartitionWriter` instance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)