zentol commented on a change in pull request #8789: [FLINK-12890] Add partition 
lifecycle related Shuffle API
URL: https://github.com/apache/flink/pull/8789#discussion_r295795687
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/shuffle/ShuffleDescriptor.java
 ##########
 @@ -50,4 +54,17 @@
        default boolean isUnknown() {
                return false;
        }
+
+       /**
+        * Returns the location of the producing task executor if the partition 
occupies local resources there.
+        *
+        * <p>Indicates that this partition occupies local resources in the 
producing task executor. Such partition requires
+        * that the task executor is running and being connected to be able to 
consume the produced data. This is mostly
+        * relevant for the batch jobs and blocking result partitions which 
should outlive the producer lifetime and
+        * be released externally: {@link 
ResultPartitionDeploymentDescriptor#isReleasedOnConsumption()} is {@code false}.
+        * {@link ShuffleEnvironment#releasePartitions(Collection)} can be used 
to release such kind of partitions locally.
+        *
+        * @return the resource id of the producing task executor if the 
partition occupies local resources there
+        */
+       Optional<ResourceID> hasLocalResources();
 
 Review comment:
   if there are local resources, does this imply that there aren't _any_ 
external resources? (Basically, I want to double-check when we have to issue 
release calls to the ShuffleMaster)

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