Skip to content

Commit

Permalink
[FLINK-12763][runtime] Yarn/MesosResourceManager do not start new wor…
Browse files Browse the repository at this point in the history
…ker when requested resource profile cannot be satisfied.
  • Loading branch information
xintongsong authored and StephanEwen committed Jul 10, 2019
1 parent 973afee commit 887b8d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ protected void internalDeregisterApplication(

@Override
public Collection<ResourceProfile> startNewWorker(ResourceProfile resourceProfile) {
if (!slotsPerWorker.iterator().next().isMatching(resourceProfile)) {
return Collections.emptyList();
}
LOG.info("Starting a new worker.");
try {
// generate new workers into persistent state and launch associated actors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,10 @@ protected void internalDeregisterApplication(

@Override
public Collection<ResourceProfile> startNewWorker(ResourceProfile resourceProfile) {
Preconditions.checkArgument(
ResourceProfile.UNKNOWN.equals(resourceProfile),
"The YarnResourceManager does not support custom ResourceProfiles yet. It assumes that all containers have the same resources.");
if (!slotsPerWorker.iterator().next().isMatching(resourceProfile)) {
return Collections.emptyList();
}
requestYarnContainer();

return slotsPerWorker;
}

Expand Down

0 comments on commit 887b8d9

Please sign in to comment.