kbendick commented on issue #2028:
URL: https://github.com/apache/iceberg/issues/2028#issuecomment-756072537


   Do you know if anybody else encountered this issue? Additionally, is there 
any more stacktrace that was left off? It seems like there might be something 
after the `Caused by: java.lang.UnsupportedOperationException`. As an example, 
I found this in the twitter `Chill` issues:
   
   Example stack trace with helpful info after the 
UnsupportedOperationException: 
https://github.com/EsotericSoftware/kryo/issues/472
   ```
   com.esotericsoftware.kryo.KryoException: 
java.lang.UnsupportedOperationException: ConfigObject is immutable, you can't 
call Map.put
   [error] Serialization trace: ...
   ```
   
   In general, the `Caused by` portion of the stack trace is likely to be the 
most informative. It's not exactly straight forward to tell what's happening 
here, as there's some code that seems to maybe be commented out for 
`registerSerializer` that could very well be very important to this 
serialization issue.
   
   Serializability issues of this sort are not an uncommon problem with both 
Kryo and Flink. In Flink, if one does not provide a custom type serializer, 
then it falls back to kryo. Kryo has limitations on its ability to 
(de)serialize objects, such as the mentioned limitation on serializing 
immutable objects (as well as some issues around fields that are or are not 
marked as final etc).
   
   If I had to guess, based on quickly poking around the code, specifically the 
`org.apache.iceberg.Metrics` class, I would say that likely the `Metrics` are 
being instantiated with an immutable map for that field. Kryo likely does not 
like this. If you're looking to take up this issue and don't have background in 
Kryo / Flink serialization, this stack overflow question might help you get a 
better understanding of the issue (as well the the above linked issue from the 
kryo repo):
   
   
https://stackoverflow.com/questions/14499670/serializing-and-deserializing-object-arrays-in-kryo
   
   I can follow up with more information if need be, but it would be helpful if 
you provided any further stack trace after the `Caused by 
java.lang.UnsupportedOperationException` as well as any information about types 
that you register with the flink runtime (as it appears there is a 
registerSerializer() function that's probably highly relevant here).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to