为什么字数统计结果与Spark网站上给出的字数不同?

时间:2019-05-31 09:14:04

标签: spark-streaming word-count

我是Spark流媒体的新手,刚刚从spark官方网站上给出的字数入手。但是,即使在写入流中使用“完全”模式后,为什么我仍未获得汇总结果?

https://spark.apache.org/docs/2.3.0/structured-streaming-programming-guide.html从这里我选择了代码并在eclipse中运行,但只给出了一行结果。

-------------------------------------------
Time: 1559293328000 ms
-------------------------------------------
(th,4)

-------------------------------------------
Time: 1559293329000 ms
-------------------------------------------

19/05/31 11:02:09 WARN RandomBlockReplicationPolicy: Expecting 1 replicas with only 0 peer/s.
19/05/31 11:02:09 WARN BlockManager: Block input-0-1559293329600 replicated to only 0 peer(s) instead of 1 peers
-------------------------------------------
Time: 1559293330000 ms
-------------------------------------------
(th,2)

0 个答案:

没有答案