Skip to content

Commit

Permalink
Merge pull request #15 from ryan-williams/ser
Browse files Browse the repository at this point in the history
dedupe serializer initialization
  • Loading branch information
ryan-williams committed Apr 7, 2017
2 parents db94da8 + 4405cdf commit 45d6cdd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sbt
@@ -1,6 +1,6 @@
name := "spark-tests"

version := "1.3.4"
version := "1.3.5"

libraryDependencies ++= Seq(
libs.value('paths),
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
@@ -1 +1 @@
addSbtPlugin("org.hammerlab" % "sbt-parent" % "1.7.2")
addSbtPlugin("org.hammerlab" % "sbt-parent" % "1.7.6")
Expand Up @@ -9,9 +9,9 @@ import org.apache.spark.SparkEnv
* Mix-in that exposes a Spark [[org.apache.spark.serializer.Serializer]] instance.
*/
trait SparkSerialization {
self: SharedSparkContext =>
self: SharedSparkContext

private def serializer = SparkEnv.get.serializer.newInstance()
private lazy val serializer = SparkEnv.get.serializer.newInstance()

def serialize(item: Any): ByteBuffer = serializer.serialize(item)
def deserialize[T](bytes: ByteBuffer): T = serializer.deserialize(bytes)
Expand Down

0 comments on commit 45d6cdd

Please sign in to comment.