关注 spark技术分享,
撸spark源码 玩spark最佳实践

ForeachBatchSink

ForeachBatchSink

ForeachBatchSink is a streaming sink that is used for the foreachBatch source.

ForeachBatchSink is created exclusively when DataStreamWriter is requested to start execution of the streaming query (with the foreachBatch source).

ForeachBatchSink uses ForeachBatchSink name.

Creating ForeachBatchSink Instance

ForeachBatchSink takes the following when created:

  • Batch writer ((Dataset[T], Long) ⇒ Unit)

  • Encoder (ExpressionEncoder[T])

Adding Batch — addBatch Method

Note
addBatch is a part of Sink Contract to “add” a batch of data to the sink.

addBatch…​FIXME

赞(0) 打赏
未经允许不得转载:spark技术分享 » ForeachBatchSink
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏