我是spark的初学者,并且尝试使用docker运行spark示例NetworkWordCount。但是在运行示例时没有输出:
通过docker exec -it container_id bash
启动一个新终端,
root@sandbox:/usr/local/spark# nc -lk 9999
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
a ba c d e f g
然后启动另一个终端:
root@sandbox:/usr/local/spark# bin/run-example streaming.NetworkWordCount localhost 9999
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
16/05/12 02:55:57 INFO StreamingExamples: Setting log level to [WARN] for streaming example. To override add a custom log4j.properties to the classpath.
16/05/12 02:55:58 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
...
有人可以帮助我吗?
最佳答案
使用下面的命令执行对我有用。
[root@quickstart spark]# ./bin/run-example streaming.NetworkWordCount localhost 9999 --master "local[2]"
关于scala - 运行spark NetworkWordCount示例时无输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37176564/