aboutsummaryrefslogtreecommitdiff
path: root/python/examples/wordcount.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples/wordcount.py')
-rwxr-xr-x[-rw-r--r--]python/examples/wordcount.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/python/examples/wordcount.py b/python/examples/wordcount.py
index 41c846ba79..b9139b9d76 100644..100755
--- a/python/examples/wordcount.py
+++ b/python/examples/wordcount.py
@@ -23,8 +23,7 @@ from pyspark import SparkContext
if __name__ == "__main__":
if len(sys.argv) < 3:
- print >> sys.stderr, \
- "Usage: PythonWordCount <master> <file>"
+ print >> sys.stderr, "Usage: wordcount <master> <file>"
exit(-1)
sc = SparkContext(sys.argv[1], "PythonWordCount")
lines = sc.textFile(sys.argv[2], 1)
@@ -33,4 +32,4 @@ if __name__ == "__main__":
.reduceByKey(add)
output = counts.collect()
for (word, count) in output:
- print "%s : %i" % (word, count)
+ print "%s: %i" % (word, count)