【发布时间】:2017-08-01 00:12:19
【问题描述】:
我使用这一行从我的 RDD 计数中打印一条消息:
myDStream.count.print
我得到类似的东西:
-------------------------------------------
Time: 1501499254000 ms
-------------------------------------------
2
-------------------------------------------
Time: 1501499256000 ms
-------------------------------------------
0
-------------------------------------------
Time: 1501499258000 ms
-------------------------------------------
0
我只是想像这样重新格式化这条消息:
-------------------------------------------
Time: 1501499254000 ms
-------------------------------------------
log.info Got new batch with 2 messages
-------------------------------------------
Time: 1501499256000 ms
-------------------------------------------
log.info Got new batch with 0 messages
-------------------------------------------
Time: 1501499258000 ms
-------------------------------------------
log.info Got new batch with 0 messages
你有什么想法吗?
【问题讨论】:
标签: scala spark-streaming