Skip to content

Commit 9a57685

Browse files
committed
fix python style
1 parent bd27874 commit 9a57685

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/src/main/python/streaming/network_wordcount.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
if len(sys.argv) != 3:
88
print >> sys.stderr, "Usage: wordcount <hostname> <port>"
99
exit(-1)
10-
ssc = StreamingContext(appName="PythonStreamingNetworkWordCount",
10+
ssc = StreamingContext(appName="PythonStreamingNetworkWordCount",
1111
duration=Seconds(1))
1212

1313
lines = ssc.socketTextStream(sys.argv[1], int(sys.argv[2]))
1414
counts = lines.flatMap(lambda line: line.split(" "))\
1515
.map(lambda word: (word, 1))\
16-
.reduceByKey(lambda a,b: a+b)
16+
.reduceByKey(lambda a, b: a+b)
1717
counts.pyprint()
1818

1919
ssc.start()

0 commit comments

Comments
 (0)