sarutak opened a new pull request #25487: [SPARK-28769][CORE] Improve warning 
message of BarrierExecutionMode when required slots > maximum slots
URL: https://github.com/apache/spark/pull/25487
 
 
   ### What changes were proposed in this pull request?
   Improved warning message in Barrier Execution Mode when required slots > 
maximum slots.
   The new message contains information about required slots, maximum slots and 
how many times retry failed.
   
   ### Why are the changes needed?
   Providing to users with the number of required slots, maximum slots and how 
many times retry failed might help users to decide what they should do.
   For example, continuing to wait for retry succeeded or killing jobs.
   
   ### Does this PR introduce any user-facing change?
   Yes.
   If `spark.scheduler.barrier.maxConcurrentTaskCheck.maxFailures=3`, we get 
following warning message.
   
   Before applying this change:
   
   ```
   19/08/18 15:18:09 WARN DAGScheduler: The job 2 requires to run a barrier 
stage that requires more slots than the total number of slots in the cluster 
currently.
   19/08/18 15:18:24 WARN DAGScheduler: The job 2 requires to run a barrier 
stage that requires more slots than the total number of slots in the cluster 
currently.
   19/08/18 15:18:39 WARN DAGScheduler: The job 2 requires to run a barrier 
stage that requires more slots than the total number of slots in the cluster 
currently.
   19/08/18 15:18:54 WARN DAGScheduler: The job 2 requires to run a barrier 
stage that requires more slots than the total number of slots in the cluster 
currently.
   org.apache.spark.scheduler.BarrierJobSlotsNumberCheckFailed: [SPARK-24819]: 
Barrier execution mode does not allow run a barrier stage that requires more 
slots than the total number of slots in the cluster currently. Please init a 
new cluster with more CPU cores or repartition the input RDD(s) to reduce the 
number of slots required to run this barrier stage.
     at 
org.apache.spark.scheduler.DAGScheduler.checkBarrierStageWithNumSlots(DAGScheduler.scala:439)
     at 
org.apache.spark.scheduler.DAGScheduler.createResultStage(DAGScheduler.scala:453)
     at 
org.apache.spark.scheduler.DAGScheduler.handleJobSubmitted(DAGScheduler.scala:983)
     at 
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2140)
     at 
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2132)
     at 
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2121)
     at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)
     at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:749)
     at org.apache.spark.SparkContext.runJob(SparkContext.scala:2080)
     at org.apache.spark.SparkContext.runJob(SparkContext.scala:2101)
     at org.apache.spark.SparkContext.runJob(SparkContext.scala:2120)
     at org.apache.spark.SparkContext.runJob(SparkContext.scala:2145)
     at org.apache.spark.rdd.RDD.$anonfun$collect$1(RDD.scala:961)
     at 
org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
     at 
org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
     at org.apache.spark.rdd.RDD.withScope(RDD.scala:366)
     at org.apache.spark.rdd.RDD.collect(RDD.scala:960)
     ... 47 elided
   ```
   After applying this change:
   
   ```
   19/08/18 16:52:23 WARN DAGScheduler: The job 0 requires to run a barrier 
stage that requires 3 slots than the total number of slots(2) in the cluster 
currently.
   19/08/18 16:52:38 WARN DAGScheduler: The job 0 requires to run a barrier 
stage that requires 3 slots than the total number of slots(2) in the cluster 
currently (Retry 1/3 failed).
   19/08/18 16:52:53 WARN DAGScheduler: The job 0 requires to run a barrier 
stage that requires 3 slots than the total number of slots(2) in the cluster 
currently (Retry 2/3 failed).
   19/08/18 16:53:08 WARN DAGScheduler: The job 0 requires to run a barrier 
stage that requires 3 slots than the total number of slots(2) in the cluster 
currently (Retry 3/3 failed).
   org.apache.spark.scheduler.BarrierJobSlotsNumberCheckFailed: [SPARK-24819]: 
Barrier execution mode does not allow run a barrier stage that requires more 
slots than the total number of slots in the cluster currently. Please init a 
new cluster with more CPU cores or repartition the input RDD(s) to reduce the 
number of slots required to run this barrier stage.
     at 
org.apache.spark.scheduler.DAGScheduler.checkBarrierStageWithNumSlots(DAGScheduler.scala:439)
     at 
org.apache.spark.scheduler.DAGScheduler.createResultStage(DAGScheduler.scala:453)
     at 
org.apache.spark.scheduler.DAGScheduler.handleJobSubmitted(DAGScheduler.scala:983)
     at 
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2140)
     at 
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2132)
     at 
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2121)
     at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)
     at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:749)
     at org.apache.spark.SparkContext.runJob(SparkContext.scala:2080)
     at org.apache.spark.SparkContext.runJob(SparkContext.scala:2101)
     at org.apache.spark.SparkContext.runJob(SparkContext.scala:2120)
     at org.apache.spark.SparkContext.runJob(SparkContext.scala:2145)
     at org.apache.spark.rdd.RDD.$anonfun$collect$1(RDD.scala:961)
     at 
org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
     at 
org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
     at org.apache.spark.rdd.RDD.withScope(RDD.scala:366)
     at org.apache.spark.rdd.RDD.collect(RDD.scala:960)
     ... 47 elided
   ```
   
   ### How was this patch tested?
   I tested manually using Spark Shell with following configuration and script. 
And then, checked log message.
   
   ```
   $ bin/spark-shell --master local[2] --conf 
spark.scheduler.barrier.maxConcurrentTasksCheck.maxFailures=3
   scala> sc.parallelize(1 to 100, 
sc.defaultParallelism+1).barrier.mapPartitions(identity(_)).collect
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to