singhpk234 commented on issue #5414:
URL: https://github.com/apache/iceberg/issues/5414#issuecomment-1204319969

   >Caused by: java.lang.UnsupportedOperationException
   at 
org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap.put(ImmutableMap.java:714)
   
   I think this is happening because Kryo is not able to serialize / 
de-serialize Immutable map (this comes from `properties` in S3FileIO). (ref : 
https://groups.google.com/g/kryo-users/c/KP2FiJHFTzs). 
   
   possible work-around : 
   1. use Java serializer.
   2. you can use https://github.com/magro/kryo-serializers which has classes 
for Immutable Map, and register via methods described here 
https://spark.apache.org/docs/latest/tuning.html#data-serialization. As the 
twitter chill library also doesn't contains this : 
https://github.com/twitter/chill/issues/66
   
   
   Here is a sample test case in iceberg for the same, which fails in master : 
   ```java
     @Test
     public void testImmutableMapWithKryo() throws IOException {
       Map<String, String> dummyMap = ImmutableMap.of("x", "y");
       KryoHelpers.roundTripSerialize(dummyMap);
     }
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

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