singhpk234 commented on issue #5414:
URL: https://github.com/apache/iceberg/issues/5414#issuecomment-1208967246
@jessiedanwang I am not sure how kryo serializer comes to play here, are
your spark confs overriden somewhere else ?
Ideally if you don't specify any serializer by default i think spark uses
java serializer.
Note : I tried it with both with specifying
`spark.serializer=org.apache.spark.serializer.JavaSerializer` and without
specifying any serializer and can confirm it worked for me .. here is a sample
spark submit (mostly taken from your spark submit example posted above)
``` shell
spark-shell --packages
org.apache.iceberg:iceberg-spark-runtime-3.1_2.12:0.14.0,software.amazon.awssdk:bundle:2.17.243,software.amazon.awssdk:url-connection-client:2.17.243
--conf spark.serializer=org.apache.spark.serializer.JavaSerializer \
--conf spark.driver.memory=4g --conf spark.executor.cores=4 --conf
spark.dynamicAllocation.enabled=true --conf
spark.sql.catalog.my_catalog=org.apache.iceberg.spark.SparkCatalog --conf
spark.sql.catalog.my_catalog.warehouse=s3://<bucket>/<prefix> \
--conf
spark.sql.catalog.my_catalog.catalog-impl=org.apache.iceberg.aws.glue.GlueCatalog
--conf spark.sql.catalog.my_catalog.io-impl=org.apache.iceberg.aws.s3.S3FileIO
\
--conf
spark.sql.catalog.my_catalog.lock-impl=org.apache.iceberg.aws.glue.DynamoLockManager
--conf spark.sql.catalog.my_catalog.lock.table=myGlueLockTable
```
----
Regarding kryo serializer class for name :
>
kryo.register(Class.forName("org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap"),
serializer)
you should this class instead :
``` java
kryo.register(
Class.forName("org.apache.iceberg.relocated.com.google.common.collect.SingletonImmutableBiMap"),
serializer);
```
as this is the actual class being used... for just POC purpose in the
custom serializer i wrote in comment above i just did `
kryo.register(obj.getClass(), serializer);`
Here is a complete git diff of my changes with custom serializer using
`class.forName` :
https://gist.github.com/singhpk234/5e570b04a8f8145846e1019a820eaef7
I hope it helps !
--
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]