flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StephanEwen <...@git.apache.org>
Subject [GitHub] flink pull request #5995: [FLINK-9337] Implemented AvroDeserializationSchema
Date Tue, 15 May 2018 16:44:45 GMT
Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5995#discussion_r188347289
  
    --- Diff: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/AvroDeserializationSchema.java
---
    @@ -0,0 +1,215 @@
    +/*
    --- End diff --
    
    This class uses a mixture of eager initialization of transient members (in readObject())
and lazy initialization (in getDatumReader()).
    
    I would suggest to do it all one way or the other.
    
    My suggestion would be to avoid `readObject()` whenever possible. If you encounter an
exception during schema parsing (and it may be something weird from Jackson, like a missing
manifest due to a shading issue), you will get the most unhelpful exception stack trace ever,
in the weirdest place (like Flink's RPC message decoder).
    
    In my experience, when a user sees such a stack trace, they are rarely able to diagnose
that. Best case they show up on the mailing list, worst case they give up.


---

Mime
View raw message