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.
>>>
>>>
>>>
>>
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
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
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
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