在一个终端执行命令:nc -lk 9999当终端输入字符串时候,另一端看不到打印的数据。
执行命令:./bin/run-example streaming.NetworkWordCount localhost 9999
15/10/21 15:06:42 INFO scheduler.JobScheduler: Added jobs for time 1445411202000 ms
15/10/21 15:06:43 INFO storage.MemoryStore: ensureFreeSpace(14) called with curMem=16191, maxMem=280248975
15/10/21 15:06:43 INFO storage.MemoryStore: Block input-0-1445411202800 stored as bytes in memory (estimated size 14.0 B, free 267.3 MB)
15/10/21 15:06:43 INFO storage.BlockManagerInfo: Added input-0-1445411202800 in memory on localhost:47056 (size: 14.0 B, free: 267.3 MB)
查看网站:
Do not run Spark Streaming programs locally with master configured as local or local[1]. This allocates only one CPU for tasks and if a receiver is running on it, there is no resource left to process the received data. Use at least local[2] to have more cores.
将CPU核由一颗变为4颗,问题解决。
阅读(2088) | 评论(0) | 转发(0) |