aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJosh Rosen <joshrosen@eecs.berkeley.edu>2012-09-17 00:08:50 -0700
committerJosh Rosen <joshrosen@eecs.berkeley.edu>2012-09-17 00:09:16 -0700
commit9abdfa663360252d2edb346e6b3df4ff94ce78d7 (patch)
tree74528cdf3f74c2b6d4faedac1420291c691e2a12 /python
parent414367850982c4f8fc5e63cc94caa422eb736db5 (diff)
downloadspark-9abdfa663360252d2edb346e6b3df4ff94ce78d7.tar.gz
spark-9abdfa663360252d2edb346e6b3df4ff94ce78d7.tar.bz2
spark-9abdfa663360252d2edb346e6b3df4ff94ce78d7.zip
Fix Python 2.6 compatibility in Python API.
Diffstat (limited to 'python')
-rw-r--r--python/tc.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/python/tc.py b/python/tc.py
deleted file mode 100644
index 5dcc4317e0..0000000000
--- a/python/tc.py
+++ /dev/null
@@ -1,22 +0,0 @@
-from rdd import SparkContext
-
-sc = SparkContext("local", "PythonWordCount")
-e = [(1, 2), (2, 3), (4, 1)]
-
-tc = sc.parallelizePairs(e)
-
-edges = tc.mapPairs(lambda (x, y): (y, x))
-
-oldCount = 0
-nextCount = tc.count()
-
-def project(x):
- return (x[1][1], x[1][0])
-
-while nextCount != oldCount:
- oldCount = nextCount
- tc = tc.union(tc.join(edges).mapPairs(project)).distinct()
- nextCount = tc.count()
-
-print "TC has %i edges" % tc.count()
-print tc.collect()