From 260e4d54b90e7db72e83a7b01f2280842b6aaa38 Mon Sep 17 00:00:00 2001 From: Shivaram Venkataraman Date: Mon, 24 Mar 2014 19:32:05 -0700 Subject: [PATCH] Add a check for non-zero CPUs in TaskSetManager --- .../main/scala/org/apache/spark/scheduler/TaskSetManager.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala b/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala index 03b8905665f81..1295f416f7874 100644 --- a/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala +++ b/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala @@ -385,7 +385,7 @@ private[spark] class TaskSetManager( maxLocality: TaskLocality.TaskLocality) : Option[TaskDescription] = { - if (!isZombie) { + if (!isZombie && availableCpus > 0) { val curTime = clock.getTime() var allowedLocality = getAllowedLocalityLevel(curTime)