【发布时间】:2018-04-30 22:05:53
【问题描述】:
我正在处理平均负载为 100 Mb/s 的流。我有六个执行程序,每个执行程序分配了 12 Gb 的内存。但是,由于数据加载,我在几分钟内在 spark 执行程序中遇到内存不足错误(错误 52)。尽管 Spark 数据帧在概念上是 unbounded,但它似乎受总执行器内存的限制?
我的想法是大约每五分钟将数据帧/流保存为镶木地板。但是,在那之后,spark 似乎没有直接的机制来清除数据帧?
val out = df.
writeStream.
format("parquet").
option("path", "/applications/data/parquet/customer").
option("checkpointLocation", "/checkpoints/customer/checkpoint").
trigger(Trigger.ProcessingTime(300.seconds)).
outputMode(OutputMode.Append).
start
【问题讨论】:
标签: scala apache-spark spark-dataframe spark-structured-streaming