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

    https://github.com/apache/spark/pull/22001#discussion_r209277357
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -929,6 +955,28 @@ class DAGScheduler(
           // HadoopRDD whose underlying HDFS files have been deleted.
           finalStage = createResultStage(finalRDD, func, partitions, jobId, 
callSite)
         } catch {
    +      case e: Exception if e.getMessage ==
    +          
DAGScheduler.ERROR_MESSAGE_BARRIER_REQUIRE_MORE_SLOTS_THAN_CURRENT_TOTAL_NUMBER 
=>
    +        logWarning("The job requires to run a barrier stage that requires 
more slots than the " +
    +          "total number of slots in the cluster currently.")
    +        jobIdToNumTasksCheckFailures.putIfAbsent(jobId, 0)
    +        val numCheckFailures = jobIdToNumTasksCheckFailures.get(jobId) + 1
    +        if (numCheckFailures < 
DAGScheduler.DEFAULT_MAX_CONSECUTIVE_NUM_TASKS_CHECK_FAILURES) {
    +          jobIdToNumTasksCheckFailures.put(jobId, numCheckFailures)
    +          messageScheduler.schedule(
    +            new Runnable {
    +              override def run(): Unit = 
eventProcessLoop.post(JobSubmitted(jobId, finalRDD, func,
    +                partitions, callSite, listener, properties))
    +            },
    +            timeIntervalNumTasksCheck * 1000,
    +            TimeUnit.MILLISECONDS
    +          )
    +          return
    +        } else {
    +          listener.jobFailed(e)
    --- End diff --
    
    do you expect the same job submitted again? if not, we should remove the 
key from the hashmap.


---

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

Reply via email to