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:34:10 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.4 a671dad62 -> cfca1c5af


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

(cherry picked from commit 90006f3c51f8cf9535854246050e27bb76b043f0)
Signed-off-by: Kousuke Saruta <sarutak@oss.nttdata.co.jp>


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

Branch: refs/heads/branch-1.4
Commit: cfca1c5af4af96aa0483ea76d15fe2b135e5c03e
Parents: a671dad
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:34:03 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/cfca1c5a/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