Re: object in an rdd: serializable?

2014-10-17 Thread Duy Huynh
interesting.  why does case class work for this?  thanks boromir!

On Thu, Oct 16, 2014 at 10:41 PM, Boromir Widas vcsub...@gmail.com wrote:

 make it a case class should work.

 On Thu, Oct 16, 2014 at 8:30 PM, ll duy.huynh@gmail.com 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: user-unsubscr...@spark.apache.org
 For additional commands, e-mail: user-h...@spark.apache.org





object in an rdd: serializable?

2014-10-16 Thread ll
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: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



Re: object in an rdd: serializable?

2014-10-16 Thread Boromir Widas
make it a case class should work.

On Thu, Oct 16, 2014 at 8:30 PM, ll duy.huynh@gmail.com 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: user-unsubscr...@spark.apache.org
 For additional commands, e-mail: user-h...@spark.apache.org