spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From saru...@apache.org
Subject spark git commit: Pregel example type fix
Date Mon, 27 Jul 2015 16:33:44 GMT
Repository: spark
Updated Branches:
  refs/heads/master aa19c696e -> 90006f3c5


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


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/90006f3c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/90006f3c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/90006f3c

Branch: refs/heads/master
Commit: 90006f3c51f8cf9535854246050e27bb76b043f0
Parents: aa19c69
Author: Alexander Ulanov <nashb@yandex.ru>
Authored: Tue Jul 28 01:33:31 2015 +0900
Committer: Kousuke Saruta <sarutak@oss.nttdata.co.jp>
Committed: Tue Jul 28 01:33:31 2015 +0900

----------------------------------------------------------------------
 docs/graphx-programming-guide.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/90006f3c/docs/graphx-programming-guide.md
----------------------------------------------------------------------
diff --git a/docs/graphx-programming-guide.md b/docs/graphx-programming-guide.md
index 3f10cb2..99f8c82 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message