withSpark

fun <T> withSpark(sc: SparkConf, func: KSparkSession.() -> T): T

Helper function to enter Spark scope from sc like

withSpark(sc) { // this: KSparkSession

}

fun <T> withSpark(rddForConf: JavaRDDLike<*, *>, func: KSparkSession.() -> T): T

Helper function to enter Spark scope from a provided like when using the foreachRDD function.

withSpark(rdd) { // this: KSparkSession

}

fun <T> withSpark(sscForConf: JavaStreamingContext, func: KSparkSession.() -> T): T

Helper function to enter Spark scope from sscForConf like

withSpark(ssc) { // this: KSparkSession

}