Skip to content

Commit 7b0177a

Browse files
author
Rui Li
committed
remove redundant code
1 parent c7b93b5 commit 7b0177a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,6 @@ private[spark] class TaskSetManager(
188188
var hadAliveLocations = false
189189
for (loc <- tasks(index).preferredLocations) {
190190
for (execId <- loc.executorId) {
191-
if (sched.isExecutorAlive(execId)) {
192-
hadAliveLocations = true
193-
}
194191
addTo(pendingTasksForExecutor.getOrElseUpdate(execId, new ArrayBuffer))
195192
}
196193
if (sched.hasExecutorsAliveOnHost(loc.host)) {
@@ -756,7 +753,6 @@ private[spark] class TaskSetManager(
756753
def newLocAvail(index: Int): Boolean = {
757754
for (loc <- tasks(index).preferredLocations) {
758755
if (sched.hasExecutorsAliveOnHost(loc.host) ||
759-
(loc.executorId.isDefined && sched.isExecutorAlive(loc.executorId.get)) ||
760756
sched.getRackForHost(loc.host).isDefined) {
761757
return true
762758
}

0 commit comments

Comments
 (0)