http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Correctly-serializing-Number-as-state-in-ProcessFunction-tp43075p43183.html
Thanks for your replies. I agree this is a somewhat general problem.
I posted it here as I was trying to register the valid subclasses in Kryo but I couldn't get the message to go away, i.e., everything worked correctly but there was the complaint that GenericType serialization was being used.
This is how I was registering these types:
env.getConfig.registerKryoType(classOf[java.lang.Integer])
env.getConfig.registerKryoType(classOf[java.lang.Double])
and this is the message I got on every event:
flink-task-manager_1 | 2021-04-23 16:48:29.274 [Processor Function 1 (1/2)#0] INFO org.apache.flink.api.java.typeutils.TypeExtractor - No fields were detected for class java.lang.Number so it cannot be used as a POJO type and must be processed as GenericType. Please read the Flink documentation on "Data Types & Serialization" for details of the effect on performance.
In the meanwhile, I've changed my approach to reuse a protobuf type I already had as part of my input event.
Once again, thanks for your replies because they gave me the right perspective.