Skip to content

Commit aab1e8a

Browse files
wangyummingmwangWang
authored andcommitted
[CARMEL-7542][CARMEL-4965] maxNumConcurrentTasks should be defined to lazy (apache#513)
Co-authored-by: mingmwang <[email protected]> Co-authored-by: Wang <[email protected]>
1 parent b6e852d commit aab1e8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ private[spark] class DAGScheduler(
719719
private def checkBarrierStageWithNumSlots(rdd: RDD[_], rp: ResourceProfile): Unit = {
720720
if (rdd.isBarrier()) {
721721
val numPartitions = rdd.getNumPartitions
722-
val maxNumConcurrentTasks = sc.maxNumConcurrentTasks(rp)
722+
lazy val maxNumConcurrentTasks = sc.maxNumConcurrentTasks(rp)
723723
if (numPartitions > maxNumConcurrentTasks) {
724724
throw SparkCoreErrors.numPartitionsGreaterThanMaxNumConcurrentTasksError(numPartitions,
725725
maxNumConcurrentTasks)

0 commit comments

Comments
 (0)