Skip to content

Commit 2b3a795

Browse files
committed
Merge pull request #10 from mbautin/master-csd_fix_app_cores_granted
Only reduce the number of cores once when removing an executor
2 parents ceaa47d + fa1918e commit 2b3a795

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

core/src/main/scala/spark/deploy/master/ApplicationInfo.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ private[spark] class ApplicationInfo(
3434
}
3535

3636
def removeExecutor(exec: ExecutorInfo) {
37-
executors -= exec.id
38-
coresGranted -= exec.cores
37+
if (executors.contains(exec.id)) {
38+
executors -= exec.id
39+
coresGranted -= exec.cores
40+
}
3941
}
4042

4143
def coresLeft: Int = desc.maxCores - coresGranted

libpeerconnection.log

Whitespace-only changes.

0 commit comments

Comments
 (0)