Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/5636#discussion_r29463918
--- Diff:
core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala ---
@@ -475,7 +475,58 @@ class DAGSchedulerSuite
assert(results === Map(0 -> 42, 1 -> 43))
assertDataStructuresEmpty()
}
+
+ test("Test taskAbort after multiple stage failures.") {
+ // 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))
+ sparkListener.failedStages.clear()
+ scheduler.resubmitFailedStages()
--- End diff --
are these two lines needed? They don't appear in similar tests, and I
wouldn't expect them to be. `sparkListener.failedStages.clear()` should be
taken care of by `before`, and nothing has failed yet so I don't think
`scheduler.resubmitFailedStages()` is necessary. (I could easily be mistaken
about how these tests work, though ...)
---
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]