1

I am running a Spark job and I have an object Constants that contains all constant values I am using in my program.

As an example let us assume that we have the following object:

 object Constants{
   ...
   val aSet=Set[String]("foo","bar","etc",...}
   ...
 }

Is it worth broadcasting the aSet val to the nodes, or is it already available to them since it is part of the code and it it is known in compilation time?

orestis
  • 932
  • 2
  • 9
  • 23

1 Answers1

2

My understanding is that every worker will have access to the object. Some related discussion here.

Community
  • 1
  • 1
Graham S
  • 1,642
  • 10
  • 12