interesting.  why does case class work for this?  thanks boromir!

On Thu, Oct 16, 2014 at 10:41 PM, Boromir Widas <[email protected]> wrote:

> make it a case class should work.
>
> On Thu, Oct 16, 2014 at 8:30 PM, ll <[email protected]> wrote:
>
>> i got an exception complaining about serializable.  the sample code is
>> below...
>>
>> class HelloWorld(val count: Int) {
>>   ...
>>   ...
>> }
>>
>> object Test extends App {
>>   ...
>>   val data = sc.parallelize(List(new HelloWorld(1), new HelloWorld(2)))
>>   ...
>> }
>>
>> what is the best way to serialize HelloWorld so that it can be contained
>> in
>> an RDD?
>>
>> thanks!
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-spark-user-list.1001560.n3.nabble.com/object-in-an-rdd-serializable-tp16638.html
>> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>

Reply via email to