用于编写 .compact 文件的 Spark 结构化流作业参数
Spark structured streaming job parameters for writing .compact files
我目前正在从文件源流式传输,但每次需要写入 .compact 文件时,都会出现很大的延迟峰值(约 5 分钟;.compact 文件约为 2.7GB)。这有点让人恼火,因为我试图将滚动 window 的延迟保持在阈值以下,并且每隔 5 分钟就会有一次额外的时间,比如说半小时。
是否有任何用于调整 .compact 文件写入的 spark 参数?这个系统似乎很少记录。
我刚认输,答案就出现了。根据 Jacek Laskowski 关于 Spark 的书:https://jaceklaskowski.gitbooks.io/spark-structured-streaming/content/spark-sql-streaming-properties.html
有一个参数spark.sql.streaming.fileSource.log.compactInterval
控制这个间隔。但是,如果有人知道控制此行为的任何其他参数,请告诉我!
您 运行 似乎遇到了一个已报告的错误:SPARK-30462 - Structured Streaming _spark_metadata fills up Spark Driver memory when having lots of objects 已在 Spark 3.1 版中修复。
在该版本之前,没有其他配置可以防止压缩文件在使用大量内存时递增增长,这会导致压缩变慢。
结构化流媒体 Release Note 的描述如下:
Streamline the logic on file stream source and sink metadata log (SPARK-30462)
Before this change, whenever the metadata was needed in FileStreamSource/Sink, all entries in the metadata log were deserialized into the Spark driver’s memory. With this change, Spark will read and process the metadata log in a streamlined fashion whenever possible.
我目前正在从文件源流式传输,但每次需要写入 .compact 文件时,都会出现很大的延迟峰值(约 5 分钟;.compact 文件约为 2.7GB)。这有点让人恼火,因为我试图将滚动 window 的延迟保持在阈值以下,并且每隔 5 分钟就会有一次额外的时间,比如说半小时。
是否有任何用于调整 .compact 文件写入的 spark 参数?这个系统似乎很少记录。
我刚认输,答案就出现了。根据 Jacek Laskowski 关于 Spark 的书:https://jaceklaskowski.gitbooks.io/spark-structured-streaming/content/spark-sql-streaming-properties.html
有一个参数spark.sql.streaming.fileSource.log.compactInterval
控制这个间隔。但是,如果有人知道控制此行为的任何其他参数,请告诉我!
您 运行 似乎遇到了一个已报告的错误:SPARK-30462 - Structured Streaming _spark_metadata fills up Spark Driver memory when having lots of objects 已在 Spark 3.1 版中修复。
在该版本之前,没有其他配置可以防止压缩文件在使用大量内存时递增增长,这会导致压缩变慢。
结构化流媒体 Release Note 的描述如下:
Streamline the logic on file stream source and sink metadata log (SPARK-30462)
Before this change, whenever the metadata was needed in FileStreamSource/Sink, all entries in the metadata log were deserialized into the Spark driver’s memory. With this change, Spark will read and process the metadata log in a streamlined fashion whenever possible.