Posts

Showing posts with the label apache-flink

Serialize Guava's MinMaxPriorityQueue

Serialize Guava's MinMaxPriorityQueue After a few days researching why my Flink application is not working properly I've came to the conclusion that the problem resides in a MinMaxPriorityQueue I am using. MinMaxPriorityQueue It seems that this structure is not serializable. I've tried several ways to serialize it: env.getConfig.registerTypeWithKryoSerializer(classOf[MinMaxPriorityQueue[Double]], classOf[JavaSerializer]) env.getConfig.registerTypeWithKryoSerializer(classOf[MinMaxPriorityQueue[java.lang.Double]], classOf[ProtobufSerializer]); env.getConfig().addDefaultKryoSerializer(MyCustomType.class, TBaseSerializer.class); all of them without luck. However I've found this: Serializing Guava's ImmutableTable Is there an equivalent to MinMaxPriorityQueue, or a way to serialize it? Update I've translated Tomasz into scala: class MinMaxPriorityQueueSerializer extends Serializer[MinMaxPriorityQueue[Object]] { private[this] val log = LoggerFactory.getLogger(this....