You should create a pure Python object (copy the attributes from Java object), then it could be used in map.
Davies On Tue, Sep 23, 2014 at 8:48 AM, jamborta <jambo...@gmail.com> wrote: > Hi all, > > I have a java object that contains a ML model which I would like to use for > prediction (in python). I just want to iterate the data through a mapper and > predict for each value. Unfortunately, this fails when it tries to serialise > the object to sent it to the nodes. > > Is there a trick around this? Surely, this object could be picked up by > reference at the nodes. > > many thanks, > > > > -- > View this message in context: > http://apache-spark-user-list.1001560.n3.nabble.com/access-javaobject-in-rdd-map-tp14898.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 > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org