Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/4916#discussion_r148473363 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java --- @@ -220,14 +233,54 @@ public long getGlobalModVersion() { return globalModVersion; } + public CompletableFuture<TaskManagerLocation> getTaskManagerLocationFuture() { + return taskManagerLocationFuture; + } + public SimpleSlot getAssignedResource() { - return assignedResource; + return assignedResource.get(); + } + + /** + * Tries to assign the given slot to the execution. The assignment works only if the + * Execution is in state SCHEDULED. Returns true, if the resource could be assigned. + * + * @param slot to assign to this execution + * @return true if the slot could be assigned to the execution, otherwise false + */ + @VisibleForTesting + boolean tryAssignResource(final SimpleSlot slot) { + Preconditions.checkNotNull(slot); --- End diff -- Sure, will reformat it accordingly.
---