Skip to content
Snippets Groups Projects
Commit e8bec836 authored by Mikhail Bautin's avatar Mikhail Bautin Committed by Mark Hamstra
Browse files

Only reduce the number of cores once when removing an executor

parent 550b0cf4
No related branches found
No related tags found
No related merge requests found
......@@ -52,8 +52,10 @@ private[spark] class ApplicationInfo(
}
def removeExecutor(exec: ExecutorInfo) {
executors -= exec.id
coresGranted -= exec.cores
if (executors.contains(exec.id)) {
executors -= exec.id
coresGranted -= exec.cores
}
}
def coresLeft: Int = desc.maxCores - coresGranted
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment