File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
core/src/main/scala/org/apache/spark/util Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -134,9 +134,16 @@ private[spark] object AkkaUtils extends Logging {
134134 Duration .create(conf.getLong(" spark.akka.lookupTimeout" , 30 ), " seconds" )
135135 }
136136
137+ private val AKKA_MAX_FRAME_SIZE_IN_MB = Int .MaxValue / 1024 / 1024
138+
137139 /** Returns the configured max frame size for Akka messages in bytes. */
138140 def maxFrameSizeBytes (conf : SparkConf ): Int = {
139- conf.getInt(" spark.akka.frameSize" , 10 ) * 1024 * 1024
141+ val frameSizeInMB = conf.getInt(" spark.akka.frameSize" , 10 )
142+ if (frameSizeInMB > AKKA_MAX_FRAME_SIZE_IN_MB ) {
143+ throw new IllegalArgumentException (" spark.akka.frameSize should not be greater than "
144+ + AKKA_MAX_FRAME_SIZE_IN_MB + " MB" )
145+ }
146+ frameSizeInMB * 1024 * 1024
140147 }
141148
142149 /** Space reserved for extra data in an Akka message besides serialized task or task result. */
You can’t perform that action at this time.
0 commit comments