tillrohrmann commented on a change in pull request #9960: [FLINK-14476] Extend 
PartitionTracker to support promotions
URL: https://github.com/apache/flink/pull/9960#discussion_r340758317
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/PartitionTrackerImpl.java
 ##########
 @@ -147,22 +160,35 @@ public boolean isPartitionTracked(final 
ResultPartitionID resultPartitionID) {
                return Optional.of(partitionInfo);
        }
 
+       private Stream<PartitionInfo> 
stopTrackingPartitionsAndRetrievePartitionInfo(Collection<ResultPartitionID> 
resultPartitionIds) {
+               return resultPartitionIds.stream()
+                       .map(this::internalStopTrackingPartition)
+                       .flatMap(PartitionTrackerImpl::asStream);
+       }
+
        private void internalReleasePartitions(
                ResourceID potentialPartitionLocation,
                Collection<ResultPartitionDeploymentDescriptor> 
partitionDeploymentDescriptors) {
 
                
internalReleasePartitionsOnTaskExecutor(potentialPartitionLocation, 
partitionDeploymentDescriptors);
-               
internalReleasePartitionsOnShuffleMaster(partitionDeploymentDescriptors);
+               
internalReleasePartitionsOnShuffleMaster(partitionDeploymentDescriptors.stream());
+       }
+
+       private void internalReleaseOrPromotePartitions(
+               ResourceID potentialPartitionLocation,
+               Collection<ResultPartitionDeploymentDescriptor> 
partitionDeploymentDescriptors) {
+
+               
internalReleaseOrPromotePartitionsOnTaskExecutor(potentialPartitionLocation, 
partitionDeploymentDescriptors);
+               
internalReleasePartitionsOnShuffleMaster(excludePersistentPartitions(partitionDeploymentDescriptors));
 
 Review comment:
   I'm not entirely sure whether this assumption holds true. I could envision 
that the external shuffle service will also have a kind of heartbeat to the 
Flink cluster in order to decide when to release partitions or not. If this is 
the case, then one has the same problem with cluster and job partitions. But I 
agree that this does not need to be subject of this PR.

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