Repository: spark
Updated Branches:
  refs/heads/branch-1.6 fe2cf342e -> e4227cb3e


fixed numVertices in transitive closure example

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

Closes #10642 from udoklein/patch-2.

(cherry picked from commit 8c70cb4c62a353bea99f37965dfc829c4accc391)
Signed-off-by: Sean Owen <so...@cloudera.com>


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

Branch: refs/heads/branch-1.6
Commit: e4227cb3e19afafe3a7b5a2847478681db2f2044
Parents: fe2cf34
Author: Udo Klein <g...@blinkenlight.net>
Authored: Fri Jan 8 20:32:37 2016 +0000
Committer: Sean Owen <so...@cloudera.com>
Committed: Fri Jan 8 20:32:59 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/e4227cb3/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-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to