Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EB967200B5C for ; Thu, 28 Jul 2016 00:52:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EA5E3160A93; Wed, 27 Jul 2016 22:52:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 41FAA160A90 for ; Thu, 28 Jul 2016 00:52:06 +0200 (CEST) Received: (qmail 2340 invoked by uid 500); 27 Jul 2016 22:52:05 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 2328 invoked by uid 99); 27 Jul 2016 22:52:05 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2016 22:52:05 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1DCBBE02A2; Wed, 27 Jul 2016 22:52:05 +0000 (UTC) From: kayousterhout To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org References: In-Reply-To: Subject: [GitHub] spark pull request #14079: [SPARK-8425][CORE] New Blacklist Mechanism Content-Type: text/plain Message-Id: <20160727225205.1DCBBE02A2@git1-us-west.apache.org> Date: Wed, 27 Jul 2016 22:52:05 +0000 (UTC) archived-at: Wed, 27 Jul 2016 22:52:07 -0000 Github user kayousterhout commented on a diff in the pull request: https://github.com/apache/spark/pull/14079#discussion_r72538818 --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala --- @@ -611,15 +620,31 @@ private[spark] class TaskSetManager( // If no executors have registered yet, don't abort the stage, just wait. We probably // got here because a task set was added before the executors registered. - if (executors.nonEmpty) { + if (executorsByHost.nonEmpty) { // take any task that needs to be scheduled, and see if we can find some executor it *could* // run on - pendingTask.foreach { taskId => - if (executors.forall(executorIsBlacklisted(_, taskId))) { - val execs = executors.toIndexedSeq.sorted.mkString("(", ",", ")") - val partition = tasks(taskId).partitionId - abort(s"Aborting ${taskSet} because task $taskId (partition $partition)" + - s" has already failed on executors $execs, and no other executors are available.") + pendingTask.foreach { indexInTaskSet => + // try to find some executor this task can run on. Its possible that some *other* + // task isn't schedulable anywhere, but we will discover that in some later call, + // when that unschedulable task is the last task remaining. + val blacklistedEverywhere = executorsByHost.forall { case (host, execs) => + val nodeBlacklisted = blacklist.isNodeBlacklisted(host) || + isNodeBlacklistedForTaskSet(host) || + isNodeBlacklistedForTask(host, indexInTaskSet) + if (nodeBlacklisted) { + true + } else { + execs.forall { exec => + blacklist.isExecutorBlacklisted(exec) || + isExecutorBlacklistedForTaskSet(exec) || + isExecutorBlacklistedForTask(exec, indexInTaskSet) + } + } + } + if (blacklistedEverywhere) { + val partition = tasks(indexInTaskSet).partitionId + abort(s"Aborting ${taskSet} because task $indexInTaskSet (partition $partition) cannot " + + s"run anywhere due to node and executor blacklist.") --- End diff -- Maybe refer to the config options here? Anticipating confused users... --- 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 infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org For additional commands, e-mail: reviews-help@spark.apache.org