Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5636#discussion_r29690461
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala ---
    @@ -475,7 +475,148 @@ class DAGSchedulerSuite
         assert(results === Map(0 -> 42, 1 -> 43))
         assertDataStructuresEmpty()
       }
    +  
    +  test("Multiple consecutive stage failures should lead to stage being 
aborted.") {
    +    // Create a new Listener to confirm that the listenerBus sees the 
JobEnd message 
    +    // when we abort the stage. This message will also be consumed by the 
EventLoggingListener
    +    // so this will propagate up to the user. 
    +    var ended = false
    +    var jobResult : JobResult = null
    +    class EndListener extends SparkListener {
    +      override def onJobEnd(jobEnd: SparkListenerJobEnd): Unit = {
    +        jobResult = jobEnd.jobResult
    +        ended = true
    +      }
    +    }
    +
    +    sc.listenerBus.addListener(new EndListener())
    +    
    +    val shuffleMapRdd = new MyRDD(sc, 2, Nil)
    +    val shuffleDep = new ShuffleDependency(shuffleMapRdd, null)
    +    val shuffleId = shuffleDep.shuffleId
    +    val reduceRdd = new MyRDD(sc, 2, List(shuffleDep))
    +    submit(reduceRdd, Array(0, 1))
    +    
    +    complete(taskSets(0), Seq(
    +      (Success, makeMapStatus("hostA", 1)),
    +      (Success, makeMapStatus("hostB", 1))))
    +    
    +    for (x <- 1 to Stage.MAX_STAGE_FAILURES) {
    +      // the 2nd ResultTask failed
    +      complete(taskSets(1), Seq(
    --- End diff --
    
    each time a stage is failed and re-attempted, we create a new taskSet.  so 
we're actually just sending these events for the same attempt over and over, 
we're not having multiple attempts fail w/  `FetchFailed`.  (This is why you 
see the `attemptId` as `0` all the time.)
    
    each failure will trigger a new attempt for stage 0, which we should 
complete successfully, and then it will submit a new attempt for stage 1, which 
we should fail again.
    
    What I still don't understand is how we are passing the checks in the 
`else` branch below ...


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to