aboutsummaryrefslogtreecommitdiff
path: root/examples/src/main/python/sort.py
diff options
context:
space:
mode:
authorReynold Xin <rxin@apache.org>2014-05-25 14:48:27 -0700
committerReynold Xin <rxin@apache.org>2014-05-25 14:48:27 -0700
commitd79c2b28e17ec0b15198aaedd2e1f403d81f717e (patch)
tree1917d4285692d387de250f8ee8192f794bb2966c /examples/src/main/python/sort.py
parent55fddf9cc0fe420d5396b0e730c8413b2f23d636 (diff)
downloadspark-d79c2b28e17ec0b15198aaedd2e1f403d81f717e.tar.gz
spark-d79c2b28e17ec0b15198aaedd2e1f403d81f717e.tar.bz2
spark-d79c2b28e17ec0b15198aaedd2e1f403d81f717e.zip
Fix PEP8 violations in examples/src/main/python.
Author: Reynold Xin <rxin@apache.org> Closes #870 from rxin/examples-python-pep8 and squashes the following commits: 2829e84 [Reynold Xin] Fix PEP8 violations in examples/src/main/python.
Diffstat (limited to 'examples/src/main/python/sort.py')
-rwxr-xr-xexamples/src/main/python/sort.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/src/main/python/sort.py b/examples/src/main/python/sort.py
index 4913ee926a..41d00c1b79 100755
--- a/examples/src/main/python/sort.py
+++ b/examples/src/main/python/sort.py
@@ -27,8 +27,8 @@ if __name__ == "__main__":
sc = SparkContext(appName="PythonSort")
lines = sc.textFile(sys.argv[1], 1)
sortedCount = lines.flatMap(lambda x: x.split(' ')) \
- .map(lambda x: (int(x), 1)) \
- .sortByKey(lambda x: x)
+ .map(lambda x: (int(x), 1)) \
+ .sortByKey(lambda x: x)
# This is just a demo on how to bring all the sorted data back to a single node.
# In reality, we wouldn't want to collect all the data to the driver node.
output = sortedCount.collect()