Skip to content

Commit

Permalink
fied input of socketTextDStream
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Takagiwa authored and giwa committed Sep 20, 2014
1 parent dd6de81 commit f485b1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/src/main/python/streaming/nerwork_wordcount.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
exit(-1)
ssc = StreamingContext(appName="PythonStreamingNetworkWordCount", duration=Seconds(1))

lines = ssc.socketTextStream(sys.argv[1], sys.argv[2])
lines = ssc.socketTextStream(sys.argv[1], int(sys.argv[2]))
fm_lines = lines.flatMap(lambda x: x.split(" "))
filtered_lines = fm_lines.filter(lambda line: "Spark" in line)
mapped_lines = fm_lines.map(lambda x: (x, 1))
Expand Down
2 changes: 1 addition & 1 deletion python/pyspark/java_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def run(self):
java_import(gateway.jvm, "org.apache.spark.streaming.*") # do we need this?
java_import(gateway.jvm, "org.apache.spark.streaming.api.java.*")
java_import(gateway.jvm, "org.apache.spark.streaming.api.python.*")
java_import(gateway.jvm, "org.apache.spark.streaming.dstream.*") # do we need this?
java_import(gateway.jvm, "org.apache.spark.streaming.dstream.*")
java_import(gateway.jvm, "org.apache.spark.mllib.api.python.*")
java_import(gateway.jvm, "org.apache.spark.sql.SQLContext")
java_import(gateway.jvm, "org.apache.spark.sql.hive.HiveContext")
Expand Down

0 comments on commit f485b1d

Please sign in to comment.