Skip to content

Commit 158b2dc

Browse files
committed
review commit
1 parent 4afe71d commit 158b2dc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ class CoarseGrainedSchedulerBackend(scheduler: TaskSchedulerImpl, actorSystem: A
152152
// TODO: Need to throw an exception?
153153
// throw new SparkException(msg)
154154
}
155-
freeCores(task.executorId) -= scheduler.CPUS_PER_TASK
156-
executorActor(task.executorId) ! LaunchTask(new SerializableBuffer(serializedTask))
155+
else {
156+
freeCores(task.executorId) -= scheduler.CPUS_PER_TASK
157+
executorActor(task.executorId) ! LaunchTask(new SerializableBuffer(serializedTask))
158+
}
157159
}
158160
}
159161

0 commit comments

Comments
 (0)