srowen commented on a change in pull request #25487: [SPARK-28769][CORE] 
Improve warning message of BarrierExecutionMode when required slots > maximum 
slots
URL: https://github.com/apache/spark/pull/25487#discussion_r316710173
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
 ##########
 @@ -433,8 +433,10 @@ private[spark] class DAGScheduler(
    * submission.
    */
   private def checkBarrierStageWithNumSlots(rdd: RDD[_]): Unit = {
-    if (rdd.isBarrier() && rdd.getNumPartitions > sc.maxNumConcurrentTasks) {
-      throw new BarrierJobSlotsNumberCheckFailed
+    lazy val numPartitions = rdd.getNumPartitions
 
 Review comment:
   Oh wait, one last little thing: why are these local vars lazy? They're cheap 
to access. Even if not, just nest two if statements below to conditionally 
access them.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to