-
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-2897][SPARK-2920]TorrentBroadcast does use the serializer class specified in the spark option "spark.serializer" #1836
Conversation
QA tests have started for PR 1836. This patch merges cleanly. |
QA results for PR 1836: |
QA tests have started for PR 1836. This patch merges cleanly. |
QA results for PR 1836: |
def blockifyObject[T](obj: T): TorrentInfo = { | ||
val byteArray = Utils.serialize[T](obj) | ||
def blockifyObject[T: ClassTag](obj: T): TorrentInfo = { | ||
val bos =new ByteArrayOutputStream() |
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 u add a space after =?
This looks good to me other than the minor style problems I pointed out. Thanks for doing it. |
@@ -17,14 +17,14 @@ | |||
|
|||
package org.apache.spark.broadcast | |||
|
|||
import java.io.{ByteArrayInputStream, ObjectInputStream, ObjectOutputStream} | |||
import java.io._ |
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.
I'd prefer that the imports remain explicit when there are this few.
@rxin It doesn't look like we have a style policy for when it is okay to use wildcard imports?
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.
we don't, but I agree with you.
Can we also add a unit test for these two? |
…lass specified in the spark option "spark.serializer"
QA tests have started for PR 1836. This patch merges cleanly. |
@@ -69,6 +71,8 @@ class BroadcastSuite extends FunSuite with LocalSparkContext { | |||
|
|||
test("Accessing TorrentBroadcast variables in a local cluster") { | |||
val numSlaves = 4 | |||
torrentConf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer") |
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.
There should be no need to add new test.
QA tests have started for PR 1836. This patch merges cleanly. |
QA results for PR 1836: |
QA results for PR 1836: |
Thanks. Merging this in master and branch-1.1 and branch-1.0. |
…s specified in the spark option "spark.serializer" Author: GuoQiang Li <[email protected]> Closes #1836 from witgo/SPARK-2897 and squashes the following commits: 23cdc5b [GuoQiang Li] review commit ada4fba [GuoQiang Li] TorrentBroadcast does not support broadcast compression fb91792 [GuoQiang Li] org.apache.spark.broadcast.TorrentBroadcast does use the serializer class specified in the spark option "spark.serializer" (cherry picked from commit ec79063) Signed-off-by: Reynold Xin <[email protected]>
…s specified in the spark option "spark.serializer" Author: GuoQiang Li <[email protected]> Closes #1836 from witgo/SPARK-2897 and squashes the following commits: 23cdc5b [GuoQiang Li] review commit ada4fba [GuoQiang Li] TorrentBroadcast does not support broadcast compression fb91792 [GuoQiang Li] org.apache.spark.broadcast.TorrentBroadcast does use the serializer class specified in the spark option "spark.serializer" (cherry picked from commit ec79063) Signed-off-by: Reynold Xin <[email protected]>
…s specified in the spark option "spark.serializer" Author: GuoQiang Li <[email protected]> Closes apache#1836 from witgo/SPARK-2897 and squashes the following commits: 23cdc5b [GuoQiang Li] review commit ada4fba [GuoQiang Li] TorrentBroadcast does not support broadcast compression fb91792 [GuoQiang Li] org.apache.spark.broadcast.TorrentBroadcast does use the serializer class specified in the spark option "spark.serializer"
No description provided.