Re: Why I can't use broadcast var defined in a global object?

2016-08-13 Thread Ted Yu
Can you (or David) resend David's reply ? I don't see the reply in this thread. Thanks > On Aug 13, 2016, at 8:39 PM, yaochunnan wrote: > > Hi David, > Your answers have solved my problem! Detailed and accurate. Thank you very > much! > > > > -- > View this message

Re: Why I can't use broadcast var defined in a global object?

2016-08-13 Thread yaochunnan
Hi David, Your answers have solved my problem! Detailed and accurate. Thank you very much! -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Why-I-can-t-use-broadcast-var-defined-in-a-global-object-tp27523p27531.html Sent from the Apache Spark User List

Re: Why I can't use broadcast var defined in a global object?

2016-08-12 Thread yaochunnan
Hi David, Thank you for detailed reply. I understand what you said about the ideas on broadcast variable. But I am still a little bit confused. In your reply, you said: *It has sent largeValue across the network to each worker already, and gave you a/ key /to retrieve it.* So my question is,

Why I can't use broadcast var defined in a global object?

2016-08-12 Thread yaochunnan
Hi all, Here is a simplified example to show my concern. This example contains 3 files with 3 objects, depending on spark 1.6.1. //file globalObject.scala import org.apache.spark.broadcast.Broadcast object globalObject { var br_value: Broadcast[Map[Int, Double]] = null } //file