spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abi <analyst.tech.j...@gmail.com>
Subject broadcast variable not picked up
Date Fri, 13 May 2016 22:53:50 GMT
def kernel(arg):
    input = broadcast_var.value + 1
    #some processing with input

def foo():
  ....
  ....
  broadcast_var = sc.broadcast(var)
  rdd.foreach(kernel)


def main():
   #something


In this code , I get the following error:
NameError: global name 'broadcast_var ' is not defined


Any ideas on how to fix it ?




--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/broadcast-variable-not-picked-up-tp26955.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message