How to serialize objects in java? rewrite graphhopper.mapmatching into spark

115 views Asked by At

I am trying to rewritten the map matching algorithm graphhopper into spark. I want to broadcast the 'map infomation' to each worker and distribute the traces to each worker. However, the class MapMatching (which stores the map infomation) is not is not Serializable. I have tried using kryo to serialize it but it does not work.

com.esotericsoftware.kryo.KryoException: Error constructing instance of class: > com.graphhopper.matching.MapMatchin

Can I instantiate the MapMatching after broadcasting? Or how can I make it serializable? Or are there any solutions?

0

There are 0 answers