zhijiangW commented on a change in pull request #8416: [FLINK-12331] Introduce
partition/gate setup to decouple task registration with NetworkEnvironment
URL: https://github.com/apache/flink/pull/8416#discussion_r283207803
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
##########
@@ -181,13 +188,16 @@ public ResultPartition(
* <p>The pool is registered with the partition *after* it as been
constructed in order to conform
* to the life-cycle of task registrations in the {@link TaskExecutor}.
*/
- public void registerBufferPool(BufferPool bufferPool) {
+ @Override
+ public void setup() throws IOException {
+ BufferPool bufferPool = resultPartitionBufferPoolFactory.create(
+ getNumberOfSubpartitions(), getPartitionType(), this);
checkArgument(bufferPool.getNumberOfRequiredMemorySegments() >=
getNumberOfSubpartitions(),
- "Bug in result partition setup logic: Buffer
pool has not enough guaranteed buffers for this result partition.");
+ "Bug in result partition setup logic: Buffer pool has
not enough guaranteed buffers for this result partition.");
checkState(this.bufferPool == null, "Bug in result partition
setup logic: Already registered buffer pool.");
Review comment:
this check should be put before `resultPartitionBufferPoolFactory.create`
----------------------------------------------------------------
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]
With regards,
Apache Git Services