gpt4 book ai didi

apache-spark - 出错时 yarn 上的 Spark 运行两次

转载 作者:行者123 更新时间:2023-12-04 23:16:10 25 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





How to limit the number of retries on Spark job failure?

(4 个回答)


4年前关闭。




我使用在 yarn 上产生 Spark 的模型,当我遇到问题时, Spark 会自动重新启动。

无论成功或失败,我都想精确运行一次。

有没有可以设置的conf或api?

我正在使用 Spark 1.5 版。

最佳答案

您必须设置 spark.yarn.maxAppAttempts属性为 1。默认值为 yarn.resourcemanager.am.max-attempts默认为 2。

通过代码设置属性:

SparkConf conf = new SparkConf();
conf.set("spark.yarn.maxAppAttempts", "1");

通过 spark-submit 提交作业时设置:

--conf spark.yarn.maxAppAttempts=1

关于apache-spark - 出错时 yarn 上的 Spark 运行两次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41606335/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com