-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-5949] HighlyCompressedMapStatus needs more classes registered w/ kryo #4877
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
Changes from 1 commit
97beaf8
f9a0b7c
09610c6
a5cb744
709bfe0
5f6bb6d
7e13316
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,9 @@ | |
|
|
||
| package org.apache.spark.serializer | ||
|
|
||
| import org.apache.spark.scheduler.HighlyCompressedMapStatus | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sort the import |
||
| import org.apache.spark.storage.BlockManagerId | ||
|
|
||
| import scala.collection.mutable | ||
| import scala.reflect.ClassTag | ||
|
|
||
|
|
@@ -242,6 +245,16 @@ class KryoSerializerSuite extends FunSuite with SharedSparkContext { | |
| ser.newInstance().deserialize[ClassLoaderTestingObject](bytes) | ||
| } | ||
| } | ||
|
|
||
| test("registration of HighlyCompressedMapStatus") { | ||
| val conf = new SparkConf(false) | ||
| conf.set("spark.kryo.registrationRequired", "true") | ||
| val hcmo = HighlyCompressedMapStatus(BlockManagerId("exec-1", "host", 1234), Array(0l,2l,5l)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually here. again style nit, add a space after comma for the arrays. and use capital L rather than lowercase l because it is hard to tell the difference between lowercase l and capital L |
||
| val ser = new KryoSerializer(conf) | ||
| val serInstance = ser.newInstance() | ||
| serInstance.serialize(hcmo) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this actually fail without registration? My understanding is that the serialized data would contain class names instead of a more efficient identifier, but would still work.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. He set "spark.kryo.registrationRequired" to true
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. Thanks for pointing that out. |
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove this blank line |
||
| } | ||
| } | ||
|
|
||
|
|
||
|
|
||
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.
can we move this right below array[byte]?