Github user squito commented on the issue:
https://github.com/apache/spark/pull/13646
lgtm. I realized there isn't really any test for going through a mix of
narrow and shuffle dependencies -- might be nice to add this (it passes w/ this
change). You would need to change the visibility of `getShuffleDependencies`
to `private[scheduler]` though:
```scala
/**
* Ensure we get all parent shuffle stages. Walk back all narrow
dependencies, but don't go
* past any shuffle dependencies (parent stages only, not ancestor
stages).
*/
test("getShuffleDependencies") {
val rddA = new MyRDD(sc, 2, Nil)
val shuffleDepA = new ShuffleDependency(rddA, new HashPartitioner(1))
val rddB = new MyRDD(sc, 2, Nil)
val shuffleDepB = new ShuffleDependency(rddB, new HashPartitioner(1))
val rddC = new MyRDD(sc, 1, List(shuffleDepB))
val shuffleDepC = new ShuffleDependency(rddC, new HashPartitioner(1))
val rddD = new MyRDD(sc, 1, List(shuffleDepC))
val narrowDepD = new OneToOneDependency(rddD)
val finalRdd = new MyRDD(sc, 1, List(shuffleDepA, narrowDepD), tracker
= mapOutputTracker)
assert(scheduler.getShuffleDependencies(rddA) === Set())
assert(scheduler.getShuffleDependencies(rddB) === Set())
assert(scheduler.getShuffleDependencies(rddC) === Set(shuffleDepB))
assert(scheduler.getShuffleDependencies(rddD) === Set(shuffleDepC))
assert(scheduler.getShuffleDependencies(finalRdd) === Set(shuffleDepA,
shuffleDepC))
}
```
---
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]