diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-04-02 19:23:45 -0700 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-04-02 19:23:45 -0700 |
commit | b5d78307ca79b6c8c0f2733750e546ea5b0b0bb1 (patch) | |
tree | b30e69e40ee79ce56b4de83ab770ea35115b515b | |
parent | 2be2295ff244eb2585e13346bfc00109443d4287 (diff) | |
parent | 9a731f5a6dd56f5bc9eda3bb3177f7bbbb251c31 (diff) | |
download | spark-b5d78307ca79b6c8c0f2733750e546ea5b0b0bb1.tar.gz spark-b5d78307ca79b6c8c0f2733750e546ea5b0b0bb1.tar.bz2 spark-b5d78307ca79b6c8c0f2733750e546ea5b0b0bb1.zip |
Merge pull request #551 from jey/python-bugfixes
Python bugfixes
-rw-r--r-- | python/examples/transitive_closure.py | 2 | ||||
-rw-r--r-- | python/pyspark/rdd.py | 2 |
2 files changed, 2 insertions, 2 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, diff --git a/python/pyspark/rdd.py b/python/pyspark/rdd.py index 172ed85fab..a9fec17a9d 100644 --- a/python/pyspark/rdd.py +++ b/python/pyspark/rdd.py @@ -399,7 +399,7 @@ class RDD(object): >>> 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): |