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

ConsoleSink for Showing DataFrames to Console

ConsoleSink for Showing DataFrames to Console

ConsoleSink is registered as console format (by ConsoleSinkProvider).

Table 1. ConsoleSink’s Options
Name Default Value Description

numRows

20

Number of rows to display

truncate

true

Truncate the data to display to 20 characters

Adding Batch (by Showing DataFrame to Console) — addBatch Method

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

Internally, addBatch records the input batchId in lastBatchId internal property.

addBatch collects the input data DataFrame and creates a brand new DataFrame that it then shows (per numRowsToShow and isTruncated properties).

Note
You may see Rerun batch: instead if the input batchId is below lastBatchId (likely due to a batch failure).
赞(0) 打赏
未经允许不得转载:spark技术分享 » ConsoleSink for Showing DataFrames to Console
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏