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

    https://github.com/apache/spark/pull/1418#discussion_r15609962
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -275,18 +287,53 @@ class DAGScheduler(
                 case shufDep: ShuffleDependency[_, _, _] =>
                   parents += getShuffleMapStage(shufDep, jobId)
                 case _ =>
    -              visit(dep.rdd)
    +              waitingForVisit.push(dep.rdd)
               }
             }
           }
         }
    -    visit(rdd)
    +    waitingForVisit.push(rdd)
    +    while (!waitingForVisit.isEmpty) {
    +      visit(waitingForVisit.pop())
    +    }
         parents.toList
       }
     
    +  private def getParentShuffleDependencies(rdd: RDD[_]): 
Stack[ShuffleDependency[_, _, _]] = {
    --- End diff --
    
    This should actually be called getAncestorShuffleDependencies because it's 
not just direct parents, it can be grandparents and such as well.
    
    Also, please add a comment at the top of this saying that what it finds. In 
particular it only finds missing ones.
    
    Finally, would it be possible to merge this with the code that calls it in 
getShuffleMapStage, e.g. have a method called registerShuffleDependencies? 
Might be easier to follow.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to