apache/spark — pull request #3515 by JoshRosen (2014-11-29 19:48:05+00:00)
Title: [SPARK-4654] Clean up DAGScheduler getMissingParentStages / stageDependsOn methods

DAGScheduler has getMissingParentStages() and stageDependsOn() methods which are suspiciously similar to getParentStages().

Both of these methods perform traversals of the RDD / Stage graph to inspect parent stages. We can remove both of these methods, though: the set of parent stages is known when a Stage instance is constructed and is stored in Stage.parents, so we can just check for missing stages by looking for unavailable stages in Stage.parents. Similarly, we can determine whether one stage depends on another by searching Stage.parents rather than performing a graph traversal from scratch.