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_r285001670
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
 ##########
 @@ -125,52 +124,33 @@
 
        private volatile Throwable cause;
 
+       @Nonnull
+       private final FunctionWithException<BufferPoolOwner, BufferPool, 
IOException> bufferPoolFactory;
+
        public ResultPartition(
                String owningTaskName,
                TaskActions taskActions, // actions on the owning task
                JobID jobId,
                ResultPartitionID partitionId,
                ResultPartitionType partitionType,
-               int numberOfSubpartitions,
+               ResultSubpartition[] subpartitions,
                int numTargetKeyGroups,
                ResultPartitionManager partitionManager,
                ResultPartitionConsumableNotifier partitionConsumableNotifier,
-               IOManager ioManager,
-               boolean sendScheduleOrUpdateConsumersMessage) {
+               boolean sendScheduleOrUpdateConsumersMessage,
+               @Nonnull FunctionWithException<BufferPoolOwner, BufferPool, 
IOException> bufferPoolFactory) {
 
                this.owningTaskName = checkNotNull(owningTaskName);
                this.taskActions = checkNotNull(taskActions);
                this.jobId = checkNotNull(jobId);
                this.partitionId = checkNotNull(partitionId);
                this.partitionType = checkNotNull(partitionType);
-               this.subpartitions = new 
ResultSubpartition[numberOfSubpartitions];
+               this.subpartitions = subpartitions;
 
 Review comment:
   checkNotNull(subpartitions)?

----------------------------------------------------------------
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

Reply via email to