Only reduce the number of cores once when removing an executor

This commit is contained in:
Mikhail Bautin 2013-07-31 15:52:05 -07:00 committed by Mark Hamstra
parent 550b0cf48a
commit e8bec8365f

View file

@ -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