You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by HyukjinKwon <gi...@git.apache.org> on 2018/11/12 09:38:36 UTC
[GitHub] spark pull request #22779: [SPARK-25786][CORE]If the ByteBuffer.hasArray is ...
Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/22779#discussion_r232587038
--- Diff: core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala ---
@@ -338,7 +338,7 @@ private[spark] class KryoSerializerInstance(ks: KryoSerializer, useUnsafe: Boole
// Make these lazy vals to avoid creating a buffer unless we use them.
private lazy val output = ks.newKryoOutput()
- private lazy val input = if (useUnsafe) new KryoUnsafeInput() else new KryoInput()
+ private lazy val input = if (useUnsafe) new KryoUnsafeInput(4096) else new KryoInput(4096)
--- End diff --
why do we need to set the buffer size here while that's set by `setBuffer`? Can't we set it only when the `ByteBuffer` is backed by an accessible byte array?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org