1

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?

SudhirR
  • 760
  • 4
  • 11
user8262885
  • 51
  • 1
  • 9
  • I think you could try to create your own class, inherit from MapMatching and implement the Serializable interface. If using Kryo, did you try write your own custom serializer? – cabreracanal Feb 20 '19 at 12:17

0 Answers0