zentol commented on a change in pull request #8857: 
[FLINK-12960][coordination][shuffle] Move 
ResultPartitionDeploymentDescriptor#releasedOnConsumption to 
PartitionDescriptor#releasedOnConsumption
URL: https://github.com/apache/flink/pull/8857#discussion_r297107607
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/shuffle/ShuffleDescriptor.java
 ##########
 @@ -67,4 +68,31 @@ default boolean isUnknown() {
         * @return the resource id of the producing task executor if the 
partition occupies local resources there
         */
        Optional<ResourceID> storesLocalResourcesOn();
+
+       /**
+        * Return release types supported by Shuffle Service for this partition.
+        */
+       EnumSet<ReleaseType> getSupportedReleaseTypes();
+
+       /**
+        * Partition release type.
+        */
+       enum ReleaseType {
+               /**
+                * Auto-release the partition after having been fully consumed 
once.
+                *
+                * <p>No additional actions required, like {@link 
ShuffleMaster#releasePartitionExternally(ShuffleDescriptor)}
+                * or {@link 
ShuffleEnvironment#releasePartitionsLocally(Collection)}
+                */
+               AUTO,
+
+               /**
+                * Manually release the partition, the partition has to support 
consumption multiple times.
+                *
+                * <p>The partition requires manual actions to release it once 
all consumption is done:
+                * {@link 
ShuffleMaster#releasePartitionExternally(ShuffleDescriptor)} and {@link 
ShuffleEnvironment#releasePartitionsLocally(Collection)}
 
 Review comment:
   this is slight ambiguous as it isn't whether the local resource condition 
applies to just the ShuffleEnvironment call or both of them.
   I'd suggest something along the lines of `ShuffleMaster[...] and, if [...], 
ShuffleEnvironment [...]`

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