Permalink
Browse files

Merge pull request #551 from jey/python-bugfixes

Python bugfixes
  • Loading branch information...
2 parents 2be2295 + 9a731f5 commit b5d78307ca79b6c8c0f2733750e546ea5b0b0bb1 @mateiz mateiz committed Apr 3, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 python/examples/transitive_closure.py
  2. +1 −1 python/pyspark/rdd.py
@@ -24,7 +24,7 @@ def generateGraph():
"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,
@@ -399,7 +399,7 @@ def saveAsTextFile(self, path):
>>> sc.parallelize(range(10)).saveAsTextFile(tempFile.name)
>>> from fileinput import input
>>> from glob import glob
- >>> ''.join(input(glob(tempFile.name + "/part-0000*")))
+ >>> ''.join(sorted(input(glob(tempFile.name + "/part-0000*"))))
'0\\n1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\\n'
"""
def func(split, iterator):

0 comments on commit b5d7830

Please sign in to comment.