-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-7392][Core] bugfix: Kryo buffer size cannot be larger than 2M #5934
Conversation
Ah good catch I think. CC @ilganeli |
Test build #31951 has finished for PR 5934 at commit
|
Test build #31963 has finished for PR 5934 at commit
|
@@ -51,9 +51,9 @@ class KryoSerializer(conf: SparkConf) | |||
|
|||
private val bufferSizeKb = conf.getSizeAsKb("spark.kryoserializer.buffer", "64k") | |||
|
|||
if (bufferSizeKb >= 2048) { | |||
if (bufferSizeKb >= 2048 * 1024) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use ByteUnit.MiB.toKiB(2) for clarity here.
@ilganeli , Thank you for your comments, code updated. |
Test build #31983 has finished for PR 5934 at commit
|
Jenkins, retest this please |
Test build #31982 has finished for PR 5934 at commit
|
Test build #31989 has finished for PR 5934 at commit
|
Author: Zhang, Liye <[email protected]> Closes #5934 from liyezhang556520/kryoBufSize and squashes the following commits: 5707e04 [Zhang, Liye] fix import order 8693288 [Zhang, Liye] replace multiplier with ByteUnit methods 9bf93e9 [Zhang, Liye] add tests d91e5ed [Zhang, Liye] change kb to mb (cherry picked from commit c2f0821) Signed-off-by: Sean Owen <[email protected]>
@@ -32,6 +32,36 @@ class KryoSerializerSuite extends FunSuite with SharedSparkContext { | |||
conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer") | |||
conf.set("spark.kryo.registrator", classOf[MyRegistrator].getName) | |||
|
|||
test("configuration limits") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General style note: this test has a lot of repetition in it; the fact that we have four conf variables, conf1, conf2, conf3, and conf4, suggests that this could have benefitted from an inline def
that abstracts away the actual configuration manipulation and KryoSerializer instantiation. Either this or whitespace between the individual cases would make this test easier to quickly scan through.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it would have been nice to have the test name reference the JIRA number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll make a new PR.
this modification is according to JoshRosen 's comments, for details, please refer to [#5934](https://github.com/apache/spark/pull/5934/files#r30949751). Author: Zhang, Liye <[email protected]> Closes #6395 from liyezhang556520/kryoTest and squashes the following commits: da214c8 [Zhang, Liye] refine Kryo test suite accroding to Josh's comments
Author: Zhang, Liye <[email protected]> Closes apache#5934 from liyezhang556520/kryoBufSize and squashes the following commits: 5707e04 [Zhang, Liye] fix import order 8693288 [Zhang, Liye] replace multiplier with ByteUnit methods 9bf93e9 [Zhang, Liye] add tests d91e5ed [Zhang, Liye] change kb to mb
Author: Zhang, Liye <[email protected]> Closes apache#5934 from liyezhang556520/kryoBufSize and squashes the following commits: 5707e04 [Zhang, Liye] fix import order 8693288 [Zhang, Liye] replace multiplier with ByteUnit methods 9bf93e9 [Zhang, Liye] add tests d91e5ed [Zhang, Liye] change kb to mb
this modification is according to JoshRosen 's comments, for details, please refer to [apache#5934](https://github.com/apache/spark/pull/5934/files#r30949751). Author: Zhang, Liye <[email protected]> Closes apache#6395 from liyezhang556520/kryoTest and squashes the following commits: da214c8 [Zhang, Liye] refine Kryo test suite accroding to Josh's comments
Author: Zhang, Liye <[email protected]> Closes apache#5934 from liyezhang556520/kryoBufSize and squashes the following commits: 5707e04 [Zhang, Liye] fix import order 8693288 [Zhang, Liye] replace multiplier with ByteUnit methods 9bf93e9 [Zhang, Liye] add tests d91e5ed [Zhang, Liye] change kb to mb
this modification is according to JoshRosen 's comments, for details, please refer to [apache#5934](https://github.com/apache/spark/pull/5934/files#r30949751). Author: Zhang, Liye <[email protected]> Closes apache#6395 from liyezhang556520/kryoTest and squashes the following commits: da214c8 [Zhang, Liye] refine Kryo test suite accroding to Josh's comments
No description provided.