Configuring Maximum Attempts for Applications

When an ApplicationMaster fails, the ResourceManager restarts the ApplicationMaster as long as the number of restart attempts does not exceed the max-attempt values set at the ResourceManager and ApplicationMaster level . By default, the maximum attempt value is set to 2.
  • To configure the maximum number of ApplicationMaster attempt retries for all applications run by the ResourceManager:
    Set the value of yarn.resourcemanager.am.max-attempts in yarn-site.xml. The value defaults to 2.
  • To configure the number of ApplicationMaster attempts allowed for the MapReduce ApplicationMaster:
    Set the value of mapreduce.am.max-attempts in mapred-site.xml. The value defaults to 2.