spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayousterhout <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-10622] [core] [yarn] Differentiate dead...
Date Mon, 26 Oct 2015 00:24:39 GMT
Github user kayousterhout commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8887#discussion_r42952922
  
    --- Diff: core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala
---
    @@ -237,4 +237,39 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext
with L
         }
       }
     
    +  test("tasks are not re-scheduled while executor loss reason is pending") {
    +    sc = new SparkContext("local", "TaskSchedulerImplSuite")
    +    val taskScheduler = new TaskSchedulerImpl(sc)
    +    taskScheduler.initialize(new FakeSchedulerBackend)
    +    // Need to initialize a DAGScheduler for the taskScheduler to use for callbacks.
    +    new DAGScheduler(sc, taskScheduler) {
    +      override def taskStarted(task: Task[_], taskInfo: TaskInfo) {}
    +      override def executorAdded(execId: String, host: String) {}
    +    }
    +
    +    val e0Offers = Seq(new WorkerOffer("executor0", "host0", 1))
    +    val e1Offers = Seq(new WorkerOffer("executor1", "host0", 1))
    +    val attempt1 = FakeTask.createTaskSet(1)
    +
    +    // submit attempt 1, offer resources, task gets scheduled
    +    taskScheduler.submitTasks(attempt1)
    +    val taskDescriptions = taskScheduler.resourceOffers(e0Offers).flatten
    +    assert(1 === taskDescriptions.length)
    +
    +    // mark executor0 as dead but pending fail reason
    +    taskScheduler.executorLost("executor0", LossReasonPending)
    +
    +    // offer some more resources on a different executor, nothing should change
    +    val taskDescriptions2 = taskScheduler.resourceOffers(e1Offers).flatten
    +    assert(0 === taskDescriptions2.length)
    +
    +    // now really kill the executor
    --- End diff --
    
    change to "Now give the scheduler the final reason why the executor failed"?(comment is
mis-leading as-is)


---
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


Mime
View raw message