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

Conversation

mccheah
Copy link
Contributor

@mccheah mccheah commented Mar 26, 2015

Kryo buffers are backed by byte arrays, but primitive arrays can only be
up to 2GB in size. It is misleading to allow users to set buffers past
this size.

Kryo buffers are backed by byte arrays, but primitive arrays can only be
up to 2GB in size. It is misleading to allow users to set buffers past
this size.
@SparkQA
Copy link

SparkQA commented Mar 27, 2015

Test build #29260 has finished for PR 5218 at commit 60634f9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 27, 2015

Test build #29262 has finished for PR 5218 at commit 09fd80b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@@ -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: Double = conf.getDouble("spark.kryoserializer.buffer.mb", 0.064)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declaring the type here is more descriptive, but I'd leave it out to be consistent with the other variables in the class.

@liancheng
Copy link
Contributor

LGTM

throw new IllegalArgumentException("spark.kryoserializer.buffer.max.mb must be less than " +
s"2048 mb, got: + $maxBufferSizeMb mb.")
}
private val maxBufferSize = maxBufferSizeMb * 1026 * 1024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to be 1026 * 1024?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch =D

@sryza
Copy link
Contributor

sryza commented Mar 27, 2015

LGTM pending jenkins

@SparkQA
Copy link

SparkQA commented Mar 27, 2015

Test build #29273 has finished for PR 5218 at commit e2e30ce.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 27, 2015

Test build #29277 has finished for PR 5218 at commit 1d6d1be.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@pwendell
Copy link
Contributor

LGTM - merged into master.

@asfgit asfgit closed this in 49d2ec6 Mar 27, 2015
@robert3005 robert3005 deleted the feature/limit-kryo-buffer branch September 24, 2016 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants