Hi, I'm moving some code from Scala to Java and I just hit a wall where I'm trying to move an RDD with a custom data structure to java, but I'm not being able to do so:
Scala Code: case class IncodentDoc(system_id: String, category: String, terms: Seq[String]) var incTup = inc_filtered.map(record => { //some logic TermDoc(sys_id, category, termsSeq) }) On Java I'm trying: class TermDoc implements Serializable { public String system_id; public String category; public String[] terms; public TermDoc(String system_id, String category, String[] terms) { this.system_id = system_id; this.category = category; this.terms = terms; } } JavaRDD<TermDoc> incTup = inc_filtered.map(record -> { //some code return new TermDoc(sys_id, category, termsArr); }); When I run my code, I get hit with a Task not serializable error, what am I missing so I can use custom classes inside the RDD just like in scala? Cheers --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org