Github user dhruve commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18950#discussion_r133321125
  
    --- Diff: 
core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala ---
    @@ -602,6 +604,21 @@ private[spark] class ExecutorAllocationManager(
         // place the executors.
         private val stageIdToExecutorPlacementHints = new mutable.HashMap[Int, 
(Int, Map[String, Int])]
     
    +    override def onJobStart(jobStart: SparkListenerJobStart): Unit = {
    +      val jobGroupId = if (jobStart.properties != null) {
    +        jobStart.properties.getProperty(SparkContext.SPARK_JOB_GROUP_ID)
    +      } else {
    +        ""
    +      }
    +      val maxConcurrentTasks = 
conf.getInt(s"spark.job.$jobGroupId.maxConcurrentTasks",
    +        Int.MaxValue)
    +
    +      logInfo(s"Setting maximum concurrent tasks for group: ${jobGroupId} 
to $maxConcurrentTasks")
    +      allocationManager.synchronized {
    +        allocationManager.maxConcurrentTasks = maxConcurrentTasks
    --- End diff --
    
    I am sorry if the config name caused the confusion. The limit is per 
jobGroup and not per job.
    so we can really name it as 
`spark.jobGroup.[userJobGroup].maxConcurrentTasks`.
    
    Also spark allows us to set only a single job group at any given point in 
time with a single spark context.


---
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