Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comment to justify testing of getNarrowAncestors with cycles
  • Loading branch information
andrewor14 committed Apr 23, 2014
commit 5d799fedbe7236095de49a780f1c6c98ce2de8ec
6 changes: 6 additions & 0 deletions core/src/test/scala/org/apache/spark/rdd/RDDSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,12 @@ class RDDSuite extends FunSuite with SharedSparkContext {
assert(ancestors9.count(_.isInstanceOf[MappedValuesRDD[_, _, _]]) === 1)
}

/**
* This tests for the pathological condition in which the RDD dependency graph is cyclical.
*
* Since RDD is part of the public API, applications may actually implement RDDs that allow
* such graphs to be constructed. In such cases, getNarrowAncestor should not simply hang.
*/
test("getNarrowAncestors with cycles") {
val rdd1 = new CyclicalDependencyRDD[Int]
val rdd2 = new CyclicalDependencyRDD[Int]
Expand Down