GJL commented on a change in pull request #10255: [FLINK-14859][runtime] Avoid 
leaking unassigned slots 
URL: https://github.com/apache/flink/pull/10255#discussion_r348405012
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DeploymentHandle.java
 ##########
 @@ -66,4 +70,14 @@ public DeploymentOption getDeploymentOption() {
        public SlotExecutionVertexAssignment getSlotExecutionVertexAssignment() 
{
                return slotExecutionVertexAssignment;
        }
+
+       public Optional<LogicalSlot> getLogicalSlot() {
+               final CompletableFuture<LogicalSlot> logicalSlotFuture = 
slotExecutionVertexAssignment.getLogicalSlotFuture();
+               Preconditions.checkState(logicalSlotFuture.isDone(), "method 
can only be called after slot future is done");
+
+               if (logicalSlotFuture.isCompletedExceptionally() || 
logicalSlotFuture.isCancelled()) {
 
 Review comment:
   fixed

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to