spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Margusja <mar...@roo.ee>
Subject Get broadcast (set in one method) in another method
Date Thu, 25 Jan 2018 20:04:15 GMT
Hi

Maybe I am overthinking. I’d like to set broadcast in object A method y  and get it in object
A method x.

In example:

object A {

def main (args: Array[String]) {
	y()
	x()
}

def x() : Unit = {
	val a = bcA.value
	...
}

def y(): String = {
	val bcA = sc.broadcast(a) 
	…
	return “String value"
}

}




---
Br
Margus
Mime
View raw message