You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2016/01/08 21:32:42 UTC

spark git commit: fixed numVertices in transitive closure example

Repository: spark
Updated Branches:
  refs/heads/master 00d926172 -> 8c70cb4c6


fixed numVertices in transitive closure example

Author: Udo Klein <gi...@blinkenlight.net>

Closes #10642 from udoklein/patch-2.


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

Branch: refs/heads/master
Commit: 8c70cb4c62a353bea99f37965dfc829c4accc391
Parents: 00d9261
Author: Udo Klein <gi...@blinkenlight.net>
Authored: Fri Jan 8 20:32:37 2016 +0000
Committer: Sean Owen <so...@cloudera.com>
Committed: Fri Jan 8 20:32:37 2016 +0000

----------------------------------------------------------------------
 examples/src/main/python/transitive_closure.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/8c70cb4c/examples/src/main/python/transitive_closure.py
----------------------------------------------------------------------
diff --git a/examples/src/main/python/transitive_closure.py b/examples/src/main/python/transitive_closure.py
index 7bf5fb6..3d61250 100755
--- a/examples/src/main/python/transitive_closure.py
+++ b/examples/src/main/python/transitive_closure.py
@@ -30,8 +30,8 @@ rand = Random(42)
 def generateGraph():
     edges = set()
     while len(edges) < numEdges:
-        src = rand.randrange(0, numEdges)
-        dst = rand.randrange(0, numEdges)
+        src = rand.randrange(0, numVertices)
+        dst = rand.randrange(0, numVertices)
         if src != dst:
             edges.add((src, dst))
     return edges


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