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

StreamSourceProvider — Streaming Data Source Provider

StreamSourceProvider — Streaming Data Source Provider

StreamSourceProvider is the contract for objects that can create a streaming data source for a format (e.g. text file) or system (e.g. Apache Kafka) by their short names.

StreamSourceProvider is used when DataSource is requested for the name and schema of a streaming source or just creates one.

Table 1. Streaming Source Providers (in alphabetical order)
Name Description

KafkaSourceProvider

Creates KafkaSourceProvider for kafka format.

TextSocketSourceProvider

Creates TextSocketSources for socket format.

StreamSourceProvider Contract

Note
StreamSourceProvider is an experimental contract.
Table 2. StreamSourceProvider Contract (in alphabetical order)
Method Description

createSource

Creates a streaming source for a format or system (to continually read data).

Note
metadataPath is the value of the optional user-specified checkpointLocation option or resolved by StreamingQueryManager.

Used exclusively when Spark SQL’s DataSource is requested for a Source for a StreamSourceProvider (which is when StreamingRelation is requested for a logical plan).

sourceSchema

Defines the name and the schema of a streaming source

赞(0) 打赏
未经允许不得转载:spark技术分享 » StreamSourceProvider — Streaming Data Source Provider
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏