Only reduce the number of cores once when removing an executor
This commit is contained in:
parent
550b0cf48a
commit
e8bec8365f
|
@ -52,9 +52,11 @@ private[spark] class ApplicationInfo(
|
|||
}
|
||||
|
||||
def removeExecutor(exec: ExecutorInfo) {
|
||||
if (executors.contains(exec.id)) {
|
||||
executors -= exec.id
|
||||
coresGranted -= exec.cores
|
||||
}
|
||||
}
|
||||
|
||||
def coresLeft: Int = desc.maxCores - coresGranted
|
||||
|
||||
|
|
Loading…
Reference in a new issue