Search code examples
hadoopapache-sparkhadoop-yarn

Yarn - Why application attempt twice?


I made spark application which throw a error on purpose. When I ran this application on hadoop yarn, It always tried two times.

I want to run a application just once, not twice.

enter image description here


Solution

  • The number of application attempts is controlled by this property yarn.resourcemanager.am.max-attempts. This is 2 by default.

    Modify this in yarn-site.xml,

    <property>
       <name>yarn.resourcemanager.am.max-attempts</name>
       <value>1</value>
    </property>