From 7b0177aaf9a0e75a848c6f94d9104ade44643697 Mon Sep 17 00:00:00 2001 From: Rui Li Date: Fri, 6 Jun 2014 10:59:37 +0800 Subject: [PATCH] remove redundant code --- .../scala/org/apache/spark/scheduler/TaskSetManager.scala | 4 ---- 1 file changed, 4 deletions(-) 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 7ce5dcbf415e7..fa54292f7e3bd 100644 --- a/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala +++ b/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala @@ -188,9 +188,6 @@ private[spark] class TaskSetManager( var hadAliveLocations = false for (loc <- tasks(index).preferredLocations) { for (execId <- loc.executorId) { - if (sched.isExecutorAlive(execId)) { - hadAliveLocations = true - } addTo(pendingTasksForExecutor.getOrElseUpdate(execId, new ArrayBuffer)) } if (sched.hasExecutorsAliveOnHost(loc.host)) { @@ -756,7 +753,6 @@ private[spark] class TaskSetManager( def newLocAvail(index: Int): Boolean = { for (loc <- tasks(index).preferredLocations) { if (sched.hasExecutorsAliveOnHost(loc.host) || - (loc.executorId.isDefined && sched.isExecutorAlive(loc.executorId.get)) || sched.getRackForHost(loc.host).isDefined) { return true }