【问题标题】:spark on yarn run double times when error [duplicate]错误时纱线上的火花运行两次[重复]
【发布时间】:2018-08-29 13:38:57
【问题描述】:

我使用在纱线上产生火花的模型,当我遇到问题时火花会自动重启。

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

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

我使用的是 spark 1.5 版。

【问题讨论】:

    标签: apache-spark hadoop-yarn


    【解决方案1】:

    您必须将 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

    【讨论】:

    猜你喜欢
    • 2017-01-26
    • 1970-01-01
    • 1970-01-01
    • 2016-01-15
    • 2017-05-17
    • 2017-12-25
    • 1970-01-01
    • 1970-01-01
    • 2017-08-27
    相关资源
    最近更新 更多