Github user ryan-williams commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9147#discussion_r42301346
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala ---
    @@ -62,10 +62,19 @@ private[spark] class ApplicationMaster(
         .asInstanceOf[YarnConfiguration]
       private val isClusterMode = args.userClass != null
     
    -  // Default to numExecutors * 2, with minimum of 3
    -  private val maxNumExecutorFailures = 
sparkConf.getInt("spark.yarn.max.executor.failures",
    -    sparkConf.getInt("spark.yarn.max.worker.failures",
    -      math.max(sparkConf.getInt("spark.executor.instances", 0) *  2, 3)))
    +  // Default to twice the number of executors (twice the maximum number of 
executors if dynamic
    +  // allocation is enabled), with a minimum of 3.
    +  val defaultKey =
    +    if (Utils.isDynamicAllocationEnabled(sparkConf)) {
    +      "spark.dynamicAllocation.maxExecutors"
    +    } else {
    +      "spark.executor.instances"
    +    }
    +  val effectiveNumExecutors = sparkConf.getInt(defaultKey, 0)
    +  val defaultMaxNumExecutorFailures = math.max(3, 2 * 
effectiveNumExecutors)
    --- End diff --
    
    woops, didn't notice that you still wanted that scoping, fixed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to