azagrebin commented on a change in pull request #7704: [FLINK-11604][network]
Extend the necessary methods in ResultPartitionWriter interface
URL: https://github.com/apache/flink/pull/7704#discussion_r257261776
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/writer/ResultPartitionWriter.java
##########
@@ -31,12 +37,26 @@
BufferProvider getBufferProvider();
+ BufferPool getBufferPool();
Review comment:
Do you think we should expose all these buffer pool methods in
`ResultPartitionWriter`?
It seems that their calls might be specific for `NetworkEnviroment`.
Could management of buffer pools stay inside `NetworkEnviroment` (future
`ShuffleService`)?
`registerBufferPool`:
called only in `NetworkEnviroment.setupPartition` which moght be future
`ShuffleService.getResultPartitionWriter`.
`getBufferProvider`:
called in `RecordWriter.requestNewBufferBuilder` but `RecordWriter` is
probably more interested in just getting a `BufferBuilder`.
`getBufferPool` and `getNumberOfQueuedBuffers`:
called in `TaskIOMetricGroup`, but metrics look to be specific for
`ShuffleService`, maybe `TaskIOMetricGroup.initializeBufferMetrics` should
belong to `ShuffleService`?
`destroyBufferPool`:
maybe it should be `close()` from extending of `AutoClosable` interface?
`getBufferPoolOwner`:
looks like some internal thing happening between partitions and buffer pool
inside `NetworkEnviroment`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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