Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/5950#discussion_r185821296
--- Diff:
flink-core/src/main/java/org/apache/flink/api/common/typeutils/TypeSerializerSerializationUtil.java
---
@@ -373,15 +370,14 @@ public void read(DataInputView in) throws IOException
{
Thread.currentThread().setContextClassLoader(userClassLoader);
typeSerializer = (TypeSerializer<T>)
ois.readObject();
- } catch (ClassNotFoundException | InvalidClassException
e) {
+ } catch (Exception e) {
if (useDummyPlaceholder) {
// we create a dummy so that all the
information is not lost when we get a new checkpoint before receiving
// a proper typeserializer from the user
- typeSerializer =
- new
UnloadableDummyTypeSerializer<>(buffer);
- LOG.warn("Could not find requested
TypeSerializer class in classpath. Created dummy.", e);
+ typeSerializer = new
UnloadableDummyTypeSerializer<>(buffer);
--- End diff --
Some food for thought, even if it is not introduced by this PR: why can we
not introduce a special `UnloadableSerializerException extends IOException`
that holds a field with the byte array in `buffer` and let it bubble up to a
higher level component. If that component wants to introduce dummies, it can do
some from the bytes in the caught exception, if not forward the exception. Then
we would not have to hand down this flag but let the higher level component
decide. What do you think?
---