When the exception is thrown in PojoSerializer for my Event class,
yoinks
String subclassName = source.readUTF(); // subclassName
is “java.lang.Integer”
try {
actualSubclass = Class.forName(subclassName, true, cl);
} catch (ClassNotFoundException e) {
throw new RuntimeException("Cannot instantiate class.", e);
}
subclassSerializer = getSubclassSerializer(actualSubclass);
target = (T) subclassSerializer.createInstance();
// target is an Integer instead of my Event class??
// also initialize fields for which the subclass serializer is not
responsible
initializeFields(target);
From: Nathan Yu <[email protected]>
Sent: Friday, August 13, 2021 8:49 AM
To: JING ZHANG <[email protected]>; Schwalbe Matthias
<[email protected]>
Cc: [email protected]
Subject: RE: Bug with PojoSerializer? java.lang.IllegalArgumentException: Can
not set final double field Event.rating to java.lang.Integer
Does flink provide any hooks for objects before/after they are
serialized/deserialized?