aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorKay Ousterhout <kayo@yahoo-inc.com>2013-08-13 12:39:50 -0700
committerKay Ousterhout <kayo@yahoo-inc.com>2013-08-13 12:40:15 -0700
commitc92dd627ca4c0ce580b8be54010827440da77505 (patch)
tree7e06c0762806a8d5c21a0fe9d45edf46f9c5615c /core
parent622f83ce1ce522ea0058665cbf43c64a73b44439 (diff)
downloadspark-c92dd627ca4c0ce580b8be54010827440da77505.tar.gz
spark-c92dd627ca4c0ce580b8be54010827440da77505.tar.bz2
spark-c92dd627ca4c0ce580b8be54010827440da77505.zip
Properly account for killed tasks.
The TaskState class's isFinished() method didn't return true for KILLED tasks, which means some resources are never reclaimed for tasks that are killed. This also made it inconsistent with the isFinished() method used by CoarseMesosSchedulerBackend.
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/spark/TaskState.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/spark/TaskState.scala b/core/src/main/scala/spark/TaskState.scala
index 9df7d8277b..0955a91c6f 100644
--- a/core/src/main/scala/spark/TaskState.scala
+++ b/core/src/main/scala/spark/TaskState.scala
@@ -26,7 +26,7 @@ private[spark] object TaskState
type TaskState = Value
- def isFinished(state: TaskState) = Seq(FINISHED, FAILED, LOST).contains(state)
+ def isFinished(state: TaskState) = Seq(FINISHED, FAILED, KILLED, LOST).contains(state)
def toMesos(state: TaskState): MesosTaskState = state match {
case LAUNCHING => MesosTaskState.TASK_STARTING