Spark.sql.Adaptive.Semabled Work Spark结构化流?
我使用Apache Spark结构化流。结构化流是建立在Spark SQL发动机上的可扩展且耐故障的流处理引擎。由于它建立在Spark SQL引擎上,这是否表示Spark.SQL.Adaptive.Semabled为Spark结构化流媒体作品吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它在Spark Code中被禁用 - 请参阅 streamExecution :
原因是因为它在流上有状态时可能会导致问题(添加了此限制的更多详细信息 - spark-19873 )。
如果您仍然想为火花结构化流启用它(例如,如果您确定它不会在用例中造成任何损害),则可以通过设置
foreachBatch
方法在内部执行此操作。batchdf.sparksession.conf.set(sqlconf.adaptive_execution_enabled.key,“ true”)
- 这将覆盖禁用它的SPARK代码。It's disabled in Spark code - See in StreamExecution:
The reason for that is because it might cause issues when having state on the stream (more details in the ticket that added this restriction - SPARK-19873 ).
If you still want to enable it for the Spark Structured Streaming (e.g. if you are sure that it won't cause any harm in your use case), you can do that inside the
foreachBatch
method, by settingbatchDF.sparkSession.conf.set(SQLConf.ADAPTIVE_EXECUTION_ENABLED.key, "true")
- this will override the Spark code which disabled it.否。火花/最新/spark-sql/aqe.html 。不支持不流行,不适用于AQE。
想一想状态,理想情况下,小型数据集。火花结构化流中的许多限制。
No. Stated in this doc https://docs.databricks.com/spark/latest/spark-sql/aqe.html. Non-streaming not supported, does not apply for AQE.
Think of statefulness, small datasets ideally. Many restrictions in Spark Structured Streaming.