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_r257317570
 
 

 ##########
 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:
   Regarding other methods:
   
   `getNumberOfSubpartitions` and `getNumTargetKeyGroups` look like some 
general piece of information about partition which should be already known 
without `ShuffleService` from RPDD. Maybe `Environment.getWriter` should return 
some wrapping general class `ResultPartition` which could contain common info 
like those methods and `ResultPartitionWriter` produced by `ShuffleService`.
   
   Also `getPartitionId` and `getPartitionType` look to be called only in 
internals of `NetworkEnviroment` and anyways available in RPDD for `Task`.
   
   `getAllSubPartitions` is used in `ResultPartitionMetrics` which might be 
also specifics of `NetworkEnviroment`.
   
   `createSubpartitionView` and `release` (used in `ResultPartitionManager`): 
   Should `ResultPartitionManager` actually inside `NetworkEnviroment` (future 
`ShuffleService`)? It seems to be exactly at least one of the main roles of 
`ShuffleService` and its `releasePartitionsProducedBy` and `shutdown` might be 
rather associated with `ResultPartitionWriter.close` and `ShuffleService.close`.
   
   `addBufferConsumer`, `flush`, `flushAll`, `finish` look like important 
methods of `ResultPartitionWriter` interface used in `RecordWriter` and `Task`.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to