title: how to get the spark broadcast variable in the executor? spark-core
body: <p>here, I have one app which has two jobs. And in the first job, i want to set the broadcast such as setting the broadcast variable "true", accessing the broadcast in the executor. and in the second job, i want to set the broadcast variable "false". and How to achieve the requirement?
  my code is: </p>
  
  <pre><code>val conf = new SparkConf()
  val sc = new SparkContext(conf)     
  var setCapture = true
  sc.broadcast(setCapture)
  val file = lc.textFile("file" ,2)
  val flatMap = file.flatMap(line =&gt; line.split(" ")).map(word =&gt; (word, 1)).reduceByKey(_ + _)
  val report = counts.collect()
  setCapture = false
  sc.broadcast(setCapture)
  val packageResult = sc.parallelize(report).filter(_._1 == "package")
  packageResult.collect.foreach(println)
  </code></pre>
  
  <p>and I want to access the broadcast variable  " <strong>setCapture</strong> " in the</p>
  
  <p><strong>org.apache.spark.scheduler.ResultTask</strong>,</p>
  
  <p><strong>org.apache.spark.rdd.HadoopRDD</strong>, </p>
  
  <p><strong>org.apache.spark.util.collection.ExternalAppendOnlyMap</strong>, </p>
  
  <p><strong>org.apache.spark.shuffle.hash.HashShuffleWriter</strong>.</p>
  
  <p>What should i do?</p>