Skip to content

Commit

Permalink
[FLINK-12763][runtime] Yarn/MesosResourceManager set SlotManager to f…
Browse files Browse the repository at this point in the history
…ail unfulfillable requests on started.
  • Loading branch information
xintongsong authored and StephanEwen committed Jul 10, 2019
1 parent 887b8d9 commit d99877b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public MesosResourceManager(
final ContaineredTaskManagerParameters containeredTaskManagerParameters = taskManagerParameters.containeredParameters();
this.slotsPerWorker = updateTaskManagerConfigAndCreateWorkerSlotProfiles(
flinkConfig, containeredTaskManagerParameters.taskManagerTotalMemoryMB(), containeredTaskManagerParameters.numSlots());
setFailUnfulfillableRequest(true);
}

protected ActorRef createSelfActor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,14 @@ protected abstract void internalDeregisterApplication(
*/
public abstract boolean stopWorker(WorkerType worker);

/**
* Set {@link SlotManager} whether to fail unfulfillable slot requests.
* @param failUnfulfillableRequest whether to fail unfulfillable requests
*/
protected void setFailUnfulfillableRequest(boolean failUnfulfillableRequest) {
slotManager.setFailUnfulfillableRequest(failUnfulfillableRequest);
}

// ------------------------------------------------------------------------
// Static utility classes
// ------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public YarnResourceManager(
this.resource = Resource.newInstance(defaultTaskManagerMemoryMB, defaultCpus);

this.slotsPerWorker = updateTaskManagerConfigAndCreateWorkerSlotProfiles(flinkConfig, defaultTaskManagerMemoryMB, numberOfTaskSlots);
setFailUnfulfillableRequest(true);
}

protected AMRMClientAsync<AMRMClient.ContainerRequest> createAndStartResourceManagerClient(
Expand Down

0 comments on commit d99877b

Please sign in to comment.