aboutsummaryrefslogtreecommitdiff
path: root/docs/graphx-programming-guide.md
diff options
context:
space:
mode:
authorAlexander Ulanov <nashb@yandex.ru>2015-07-28 01:33:31 +0900
committerKousuke Saruta <sarutak@oss.nttdata.co.jp>2015-07-28 01:33:31 +0900
commit90006f3c51f8cf9535854246050e27bb76b043f0 (patch)
tree4c075285f7e3d13db24b4b9415240414cb2783a6 /docs/graphx-programming-guide.md
parentaa19c696e25ebb07fd3df110cfcbcc69954ce335 (diff)
downloadspark-90006f3c51f8cf9535854246050e27bb76b043f0.tar.gz
spark-90006f3c51f8cf9535854246050e27bb76b043f0.tar.bz2
spark-90006f3c51f8cf9535854246050e27bb76b043f0.zip
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 <nashb@yandex.ru> Closes #7695 from avulanov/SPARK-9380-pregel-doc and squashes the following commits: c269429 [Alexander Ulanov] Pregel example type fix
Diffstat (limited to 'docs/graphx-programming-guide.md')
-rw-r--r--docs/graphx-programming-guide.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/graphx-programming-guide.md b/docs/graphx-programming-guide.md
index 3f10cb2dc3..99f8c827f7 100644
--- a/docs/graphx-programming-guide.md
+++ b/docs/graphx-programming-guide.md
@@ -800,7 +800,7 @@ import org.apache.spark.graphx._
// Import random graph generation library
import org.apache.spark.graphx.util.GraphGenerators
// A graph with edge attributes containing distances
-val graph: Graph[Int, Double] =
+val graph: Graph[Long, Double] =
GraphGenerators.logNormalGraph(sc, numVertices = 100).mapEdges(e => e.attr.toDouble)
val sourceId: VertexId = 42 // The ultimate source
// Initialize the graph such that all vertices except the root have distance infinity.