Remove unused hasPendingTasks methods

This commit is contained in:
Kay Ousterhout 2013-12-27 15:14:38 -08:00
parent 19672dca32
commit 8419148e5f
4 changed files with 0 additions and 16 deletions

View file

@ -117,8 +117,4 @@ private[spark] class Pool(
parent.decreaseRunningTasks(taskNum)
}
}
override def hasPendingTasks(): Boolean = {
schedulableQueue.exists(_.hasPendingTasks())
}
}

View file

@ -42,5 +42,4 @@ private[spark] trait Schedulable {
def executorLost(executorId: String, host: String): Unit
def checkSpeculatableTasks(): Boolean
def getSortedTaskSetQueue(): ArrayBuffer[TaskSetManager]
def hasPendingTasks(): Boolean
}

View file

@ -365,13 +365,6 @@ private[spark] class TaskSchedulerImpl(
}
}
// Check for pending tasks in all our active jobs.
def hasPendingTasks: Boolean = {
synchronized {
rootPool.hasPendingTasks()
}
}
def executorLost(executorId: String, reason: ExecutorLossReason) {
var failedExecutor: Option[String] = None

View file

@ -681,10 +681,6 @@ private[spark] class TaskSetManager(
return foundTasks
}
override def hasPendingTasks(): Boolean = {
numTasks > 0 && tasksSuccessful < numTasks
}
private def getLocalityWait(level: TaskLocality.TaskLocality): Long = {
val defaultWait = System.getProperty("spark.locality.wait", "3000")
level match {