Github user skonto commented on a diff in the pull request: https://github.com/apache/spark/pull/17031#discussion_r103281366 --- Diff: resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala --- @@ -737,13 +735,75 @@ private[spark] class MesosClusterScheduler( if (index != -1) { pendingRetryDrivers.remove(index) pendingRetryDriversState.expunge(id) + suppressOrRevive() true } else { false } } - def getQueuedDriversSize: Int = queuedDrivers.size - def getLaunchedDriversSize: Int = launchedDrivers.size - def getPendingRetryDriversSize: Int = pendingRetryDrivers.size + private def copyBuffer(buffer: ArrayBuffer[MesosDriverDescription]): + ArrayBuffer[MesosDriverDescription] = { + val newBuffer = new ArrayBuffer[MesosDriverDescription](buffer.size) + buffer.copyToBuffer(newBuffer) + newBuffer + } + + /** + * Check if the task state is a recoverable state that we can relaunch the task. + * Task state like TASK_ERROR are not relaunchable state since it wasn't able + * to be validated by Mesos. + */ + private def isFailure(state: MesosTaskState): Boolean = { + state == MesosTaskState.TASK_FAILED || + state == MesosTaskState.TASK_LOST + } + + private def shouldSuppress: Boolean = { + return queuedDrivers.isEmpty && pendingRetryDrivers.isEmpty --- End diff -- return is redundant.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org