api.name: spark-history-server
file.upload.path: x
gcp.server.property.file.path: x
git.files.update.path: x
onprem.server.property.file.path: x
preferred.id.deployment.file.path: x
preferred.id.file.path: x
server.error.whitelabel.enabled: "false"
server.port: "18080"
server.property.file.path: x
server.servlet.context-path: /
spark.history.fs.cleaner.enabled: "true"
spark.history.fs.cleaner.interval: "1h"
spark.history.fs.cleaner.maxAge: "12h"
spring.thymeleaf.prefix: classpath:/templates/dev/
spring.thymeleaf.view-names: index,devForm,error
temp.repo.location: x我正在试图清除我的火花历史服务器日志,我已经使用这三个参数部署在Kubernetes中,如前所述,我在这里找到了答案,Cleaning up Spark history logs。
当我手动重新启动豆荚并删除超过12小时的日志时,它可以工作,但随着时间的推移,它再次开始拾取旧日志,火花历史服务器需要1-2小时才能重新启动,还有其他方法可以这样做,这样我就不必用时间手动重新启动吊舱了。
我四处打听,发现这可能是因为我使用的是像nfs这样的共享启动。
发布于 2021-07-14 16:16:07
问题是,我试图在Configmap.yaml文件中而不是Deployment.yaml文件中添加这些参数。只需在SPARK_HISTORY_OPTS中添加这些参数即可。
示例
价值:"-Dspark.history.fs.logDirectory=/FS/YOU/CREATED/ABOVE -Dspark.history.fs.cleaner.enabled=true -Dspark.history.fs.cleaner.interval=1d -Dspark.history.fs.cleaner.maxAge=7d"
这篇文章帮了我https://wbassler23.medium.com/spark-history-server-on-dc-os-516fb71523a5
https://stackoverflow.com/questions/68265021
复制相似问题