I'm desparately trying to configure serializer instances to use in my storm topology.
The storm documentation states, there are 2 ways to register serializers :
1. The name of a class to register. In this case, Storm will use Kryo’s FieldsSerializer to serialize the class. This may or may not be optimal for the class – see the Kryo docs for more details. 2. A map from the name of a class to register to an implementation of com.esotericsoftware.kryo.Serializer.
I want to use 2. ->
Map<String, Object> serializerConfig = new HashMap<String, Object>(); serializerConfig.put(Record.class.getName(), new AvroSerializer(params)); conf.put(Config.TOPOLOGY_KRYO_REGISTER, serializerConfig);
Unfortunately, this results in
Exception in thread "main" java.lang.IllegalArgumentException: Storm conf is not valid. Must be json-serializable
on topology submission.
Does anyone know how to do this (register serializer instances) ?
Thank you very much