Fix class loading issue for AWS Glue catalog in Iceberg extension#18016
Fix class loading issue for AWS Glue catalog in Iceberg extension#18016a2l007 merged 2 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Looks good, thanks for the fix! I had done a similar workaround for the Delta Lake extension as well, since the underlying library was loading the class only from the context class loader. After it was fixed upstream, we removed the workaround from the Delta extension with version upgrade. I wonder if there’s something similar we could do with the upstream Iceberg project?
Agreed on following up with ITs to catch these kinds of issues 👍 were you able to successfully connect to the AWS Glue catalog with this patch?
|
@a2l007 I think pulling the latest changes from master into your branch should resolve the CodeQL CI errors |
That sounds reasonable, I can follow up with the iceberg project and see if it can be resolved on their end.
Unfortunately, I don't have a glue catalog setup to test this end to end, but I was able to reproduce the error using the ingestion spec from #18015 and this patch resolves it. The follow up errors were access related which makes sense since I don't have access to the catalog. |
|
@a2l007 thanks a lot for providing a fix so quickly! Would it be possible for you to share a compiled version of the patched extension (as a JAR)? I’d like to upload it into my Druid image and test it directly in my EKS environment before the official release. Appreciate the support! |
@redson-bc Unfortunately, I run an internal version of JDK and cannot share jars generated from it. @abhishekrb19 Is this something you can help with? |
Fixes #18015.
Description
Fixes an issue where attempting to load iceberg tables from an AWS Glue catalog fails with ClassNotFound exceptions.
AWS Glue catalog internally uses DynConstructors which uses reflection to locate certain Glue-related classes from the iceberg-aws dependency. This uses the current thread context classloader to locate it but these classes are only available on the application classloader.
This PR does a context classloader switch to fix the issue.
Release note
Fixes an issue where loading Iceberg tables from the AWS Glue Catalog could fail due to ClassNotFoundException exceptions.
This PR has: