aboutsummaryrefslogtreecommitdiff
path: root/python/examples/transitive_closure.py
diff options
context:
space:
mode:
authorJey Kottalam <jey@cs.berkeley.edu>2013-03-10 06:16:19 +0000
committerJey Kottalam <jey@cs.berkeley.edu>2013-04-02 11:59:07 -0700
commit20604001e280a445d7c25bac6eb31b1f0512c20f (patch)
treefce07ebd0bbaa024a1d97b5887dae4ea56d4a6c2 /python/examples/transitive_closure.py
parent2be2295ff244eb2585e13346bfc00109443d4287 (diff)
downloadspark-20604001e280a445d7c25bac6eb31b1f0512c20f.tar.gz
spark-20604001e280a445d7c25bac6eb31b1f0512c20f.tar.bz2
spark-20604001e280a445d7c25bac6eb31b1f0512c20f.zip
Fix argv handling in Python transitive closure example
Diffstat (limited to 'python/examples/transitive_closure.py')
-rw-r--r--python/examples/transitive_closure.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/examples/transitive_closure.py b/python/examples/transitive_closure.py
index 73f7f8fbaf..7f85a1008e 100644
--- a/python/examples/transitive_closure.py
+++ b/python/examples/transitive_closure.py
@@ -24,7 +24,7 @@ if __name__ == "__main__":
"Usage: PythonTC <master> [<slices>]"
exit(-1)
sc = SparkContext(sys.argv[1], "PythonTC")
- slices = sys.argv[2] if len(sys.argv) > 2 else 2
+ slices = int(sys.argv[2]) if len(sys.argv) > 2 else 2
tc = sc.parallelize(generateGraph(), slices).cache()
# Linear transitive closure: each round grows paths by one edge,