Skip to content

Instantly share code, notes, and snippets.

@thomasnield
Created October 30, 2016 21:28
Show Gist options
  • Save thomasnield/974458eb2068348fde4c50f6b84758a9 to your computer and use it in GitHub Desktop.
Save thomasnield/974458eb2068348fde4c50f6b84758a9 to your computer and use it in GitHub Desktop.
import org.apache.spark.SparkConf
import org.apache.spark.api.java.JavaSparkContext
import kotlin.reflect.KClass
//collecting useful Kotlin extension functions for Spark
fun SparkConf.registerKryoClasses(vararg args: KClass<*>) = registerKryoClasses(args.map { it.java }.toTypedArray())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment