What is the proper syntax of using broadcast variables in Spark using Scala? -
i want use broadcast variable in spark scala. can't find enough on how use them. say, have object of class a, declare follows in scala.
val = new a()
what syntax of declaring broadcast variable. , how call methods?
if sc
sparkcontext
, val broadcasted = sc.broadcast(a)
broadcast a
.
can access broadcasted.value
.
Comments
Post a Comment