diff options
author | Reynold Xin <rxin@apache.org> | 2014-08-05 01:30:46 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-08-05 01:30:46 -0700 |
commit | 184048f80b6fa160c89d5bb47b937a0a89534a95 (patch) | |
tree | c645a514ad35c558318924e56582cbe54b2f06fc /core | |
parent | 9862c614c06507aa7624208f1d7ed5bc027ca52e (diff) | |
download | spark-184048f80b6fa160c89d5bb47b937a0a89534a95.tar.gz spark-184048f80b6fa160c89d5bb47b937a0a89534a95.tar.bz2 spark-184048f80b6fa160c89d5bb47b937a0a89534a95.zip |
[SPARK-2856] Decrease initial buffer size for Kryo to 64KB.
Author: Reynold Xin <rxin@apache.org>
Closes #1780 from rxin/kryo-init-size and squashes the following commits:
551b935 [Reynold Xin] [SPARK-2856] Decrease initial buffer size for Kryo to 64KB.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala b/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala index e60b802a86..407cb9db6e 100644 --- a/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala +++ b/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala @@ -47,7 +47,9 @@ class KryoSerializer(conf: SparkConf) with Logging with Serializable { - private val bufferSize = conf.getInt("spark.kryoserializer.buffer.mb", 2) * 1024 * 1024 + private val bufferSize = + (conf.getDouble("spark.kryoserializer.buffer.mb", 0.064) * 1024 * 1024).toInt + 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) |