Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/469#discussion_r11879950
--- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
@@ -236,6 +237,24 @@ abstract class RDD[T: ClassTag](
}
/**
+ * Return the ancestors of the given RDD that are related to it only
through a sequence of
+ * narrow dependencies. This traverses the given RDD's dependency tree
using DFS, but maintains
+ * no ordering on the RDDs returned.
+ */
+ private[spark] def getNarrowAncestors(
--- End diff --
Either way you need you pass in the ancestors set to avoid visiting nodes
you've already visited. Right now, because of the default argument of
`mutable.Set.empty`, the outsider calls this function this way:
`rdd.getNarrowAncestors()`. Not sure if I understand what you're suggesting but
do you mean have the outsider call it with `rdd.getNarrowAncestors` instead
(without the parentheses)? In particular, you're suggesting something like
```
def getNarrowAncestors = {
getNarrowDependencies(new empty set)
}
private def getNarrowAncestors(ancestors) = {
// actual recursive logic
}
```
right?
---
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.
---