28. Superhero Degrees of Seperation: Review the code, and run it!
Activity
Looking at the Code
val startCharacterID = 5306 // SpiderMan
val targetCharacterID = 14 // ADAM 3,031 (who?) // BFSData contains an array of hero ID connections, the distance, and color.
var hitCounter:Option[Accumulator[Int]] = None
//BFSData contains an array of hero ID connections, the distance, and color.
type BFSData = (Array[Int]), Int, String)
// A BFSNode has a heroID and the BFSData associated with it.
type BFS Node = (Int, BFSData)The Results
Previous27. Superhero Degrees of Seperation: Accumulators, and Implementing BFS in SparkNext29. Item-Based Collaborative Filtering in Spark, cache(), and persist()
Last updated