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

StreamingRelation Leaf Logical Operator for Streaming Source

StreamingRelation Leaf Logical Operator for Streaming Source

StreamingRelation is a leaf logical operator (i.e. LogicalPlan) that represents a streaming source in a logical plan.

StreamingRelation is created when DataStreamReader is requested to load data from a streaming source and creates a streaming Dataset.

StreamingRelation.png
Figure 1. StreamingRelation Represents Streaming Source

isStreaming is always enabled (i.e. true).

toString gives the source name.

Note
StreamingRelation is resolved (aka planned) to StreamingExecutionRelation (right after StreamExecution starts running batches).

Creating StreamingRelation for DataSource — apply Factory Method

apply creates a StreamingRelation for the input streaming DataSource and the short name and the schema of the streaming source (behind the DataSource).

Note
apply creates a StreamingRelation logical operator (for the input DataSource) that represents a streaming source.
Note
apply is used exclusively when DataStreamReader is requested to load data from a streaming source to a streaming Dataset.

Creating StreamingRelation Instance

StreamingRelation takes the following when created:

  • DataSource

  • Short name of the streaming source

  • Output attributes of the schema of the streaming source

赞(0) 打赏
未经允许不得转载:spark技术分享 » StreamingRelation Leaf Logical Operator for Streaming Source
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏