Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-6405] Limiting the maximum Kryo buffer size to be 2GB. #5218

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,20 @@ class KryoSerializer(conf: SparkConf)
with Logging
with Serializable {

private val bufferSize =
(conf.getDouble("spark.kryoserializer.buffer.mb", 0.064) * 1024 * 1024).toInt
private val bufferSizeMb = conf.getDouble("spark.kryoserializer.buffer.mb", 0.064)
if (bufferSizeMb >= 2048) {
throw new IllegalArgumentException("spark.kryoserializer.buffer.mb must be less than " +
s"2048 mb, got: + $bufferSizeMb mb.")
}
private val bufferSize = (bufferSizeMb * 1024 * 1024).toInt

val maxBufferSizeMb = conf.getInt("spark.kryoserializer.buffer.max.mb", 64)
if (maxBufferSizeMb >= 2048) {
throw new IllegalArgumentException("spark.kryoserializer.buffer.max.mb must be less than " +
s"2048 mb, got: + $maxBufferSizeMb mb.")
}
private val maxBufferSize = maxBufferSizeMb * 1024 * 1024

private val maxBufferSize = conf.getInt("spark.kryoserializer.buffer.max.mb", 64) * 1024 * 1024
private val referenceTracking = conf.getBoolean("spark.kryo.referenceTracking", true)
private val registrationRequired = conf.getBoolean("spark.kryo.registrationRequired", false)
private val userRegistrator = conf.getOption("spark.kryo.registrator")
Expand Down