Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/4916#discussion_r148474674
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/scheduler/Scheduler.java
---
@@ -133,32 +133,33 @@ public void shutdown() {
@Override
- public CompletableFuture<SimpleSlot> allocateSlot(ScheduledUnit task,
boolean allowQueued) {
+ public CompletableFuture<SimpleSlot> allocateSlot(
+ ScheduledUnit task,
+ boolean allowQueued,
+ Collection<TaskManagerLocation> preferredLocations) {
+
try {
- final Object ret = scheduleTask(task, allowQueued);
+ final Object ret = scheduleTask(task, allowQueued,
preferredLocations);
if (ret instanceof SimpleSlot) {
return
CompletableFuture.completedFuture((SimpleSlot) ret);
- }
- else if (ret instanceof CompletableFuture) {
+ } else if (ret instanceof CompletableFuture) {
--- End diff --
Beauty lies in the eye of the bee holder ;-) I'll revert it.
---