Skip to content

Commit 90006f3

Browse files
avulanovsarutak
authored andcommitted
Pregel example type fix
Pregel example to express single source shortest path from https://spark.apache.org/docs/latest/graphx-programming-guide.html#pregel-api does not work due to incorrect type. The reason is that `GraphGenerators.logNormalGraph` returns the graph with `Long` vertices. Fixing `val graph: Graph[Int, Double]` to `val graph: Graph[Long, Double]`. Author: Alexander Ulanov <[email protected]> Closes apache#7695 from avulanov/SPARK-9380-pregel-doc and squashes the following commits: c269429 [Alexander Ulanov] Pregel example type fix
1 parent aa19c69 commit 90006f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/graphx-programming-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ import org.apache.spark.graphx._
800800
// Import random graph generation library
801801
import org.apache.spark.graphx.util.GraphGenerators
802802
// A graph with edge attributes containing distances
803-
val graph: Graph[Int, Double] =
803+
val graph: Graph[Long, Double] =
804804
GraphGenerators.logNormalGraph(sc, numVertices = 100).mapEdges(e => e.attr.toDouble)
805805
val sourceId: VertexId = 42 // The ultimate source
806806
// Initialize the graph such that all vertices except the root have distance infinity.

0 commit comments

Comments
 (0)