Re: Brodcast Variable updated from one transformation and used from another

2015-02-25 Thread Imran Rashid
ou're attempting to modify myObjrct directly which won't work because you >>> are modifying the serialized copy on the executor. You want to do >>> myObjectBroadcasted.value.insert and myObjectBroadcasted.value.lookup. >>> >>> >>> >>

Re: Brodcast Variable updated from one transformation and used from another

2015-02-25 Thread Yiannis Gkoufas
d.value.insert and myObjectBroadcasted.value.lookup. >> >> >> >> Sent with Good (www.good.com) >> >> >> >> -Original Message----- >> *From: *Yiannis Gkoufas [johngou...@gmail.com] >> *Sent: *Tuesday, February 24, 2015 12:12 PM Eastern Standard

Re: Brodcast Variable updated from one transformation and used from another

2015-02-24 Thread Yiannis Gkoufas
ssage- > *From: *Yiannis Gkoufas [johngou...@gmail.com] > *Sent: *Tuesday, February 24, 2015 12:12 PM Eastern Standard Time > *To: *user@spark.apache.org > *Subject: *Brodcast Variable updated from one transformation and used > from another > > Hi all, > > I am trying t

RE: Brodcast Variable updated from one transformation and used from another

2015-02-24 Thread Ganelin, Ilya
p. Sent with Good (www.good.com) -Original Message- From: Yiannis Gkoufas [johngou...@gmail.com<mailto:johngou...@gmail.com>] Sent: Tuesday, February 24, 2015 12:12 PM Eastern Standard Time To: user@spark.apache.org Subject: Brodcast Variable updated from one transformation and

Brodcast Variable updated from one transformation and used from another

2015-02-24 Thread Yiannis Gkoufas
Hi all, I am trying to do the following. val myObject = new MyObject(); val myObjectBroadcasted = sc.broadcast(myObject); val rdd1 = sc.textFile("/file1").map(e => { myObject.insert(e._1); (e._1,1) }); rdd.cache.count(); //to make sure it is transformed. val rdd2 = sc.textFile("/file2").map(e