我是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
...
任何人都可以帮助我?
答案 0 :(得分:0)
使用以下命令执行对我有用。
[root@quickstart spark]# ./bin/run-example streaming.NetworkWordCount localhost 9999 --master "local[2]"