Skip to content

Commit

Permalink
In some cases, yarn does not automatically restart the container
Browse files Browse the repository at this point in the history
  • Loading branch information
witgo committed May 30, 2014
1 parent 79fa8fd commit e00b656
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ class ApplicationMaster(args: ApplicationMasterArguments, conf: Configuration,
finishApplicationMaster(FinalApplicationStatus.FAILED,
"max number of executor failures reached")
}
val numExecutorsFailed = yarnAllocator.getNumExecutorsFailed
if (numExecutorsFailed > 0) {
yarnAllocator.addResourceRequests(numExecutorsFailed)
}
yarnAllocator.allocateResources()
ApplicationMaster.incrementAllocatorLoop(1)
Thread.sleep(100)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ class ExecutorLauncher(args: ApplicationMasterArguments, conf: Configuration, sp
yarnAllocator.addResourceRequests(args.numExecutors)
while ((yarnAllocator.getNumExecutorsRunning < args.numExecutors) && (!driverClosed)) {
yarnAllocator.allocateResources()
val numExecutorsFailed = yarnAllocator.getNumExecutorsFailed
if (numExecutorsFailed > 0) {
yarnAllocator.addResourceRequests(numExecutorsFailed)
}
Thread.sleep(100)
}

Expand Down

0 comments on commit e00b656

Please sign in to comment.