Skip to content

Commit d56297e

Browse files
committed
Set limit in LocalBackend to preserve test expectations
1 parent 9f5ed19 commit d56297e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/main/scala/org/apache/spark/scheduler/local/LocalBackend.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ package org.apache.spark.scheduler.local
2020
import java.nio.ByteBuffer
2121

2222
import akka.actor.{Actor, ActorRef, Props}
23-
2423
import org.apache.spark.{Logging, SparkEnv, TaskState}
2524
import org.apache.spark.TaskState.TaskState
2625
import org.apache.spark.executor.{Executor, ExecutorBackend}
2726
import org.apache.spark.scheduler.{SchedulerBackend, TaskSchedulerImpl, WorkerOffer}
27+
import org.apache.spark.util.AkkaUtils
2828

2929
private case class ReviveOffers()
3030

@@ -106,4 +106,8 @@ private[spark] class LocalBackend(scheduler: TaskSchedulerImpl, val totalCores:
106106
override def statusUpdate(taskId: Long, state: TaskState, serializedData: ByteBuffer) {
107107
localActor ! StatusUpdate(taskId, state, serializedData)
108108
}
109+
110+
// This limit is calculated only to preserve expected behavior in tests. In reality, since this
111+
// backend sends messages over the existing actor system, there is no need to enforce a limit.
112+
override def akkaFrameSize() = AkkaUtils.maxFrameSizeBytes(scheduler.sc.getConf)
109113
}

0 commit comments

Comments
 (0)