Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CatalogUtil classloader instead of context classloader for FileIO #4957

Merged

Conversation

danielcweeks
Copy link
Contributor

Using the context classloader to dynamically load FileIO will cause problems in systems like Trino where the context classloader comes from a different plugin (e.g. information schema or describe table).

The classloader that loaded the CatalogUtil should have be the same classloader as the FileIO.

@danielcweeks danielcweeks requested a review from rdblue June 3, 2022 18:33
@github-actions github-actions bot added the core label Jun 3, 2022
@danielcweeks danielcweeks force-pushed the catalogutil-fileio-classloader branch from 99ab36a to 7b981fa Compare June 3, 2022 18:49
Copy link
Contributor

@rdblue rdblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this. We've hit problems like this in the past (with Avro reads, for example) where we want to use the classloader that loaded Iceberg itself. At least by default.

This looks good to me when tests are passing.

@github-actions github-actions bot added the AWS label Jun 3, 2022
Copy link
Contributor

@kbendick kbendick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Good catch @danielcweeks! We have indeed encountered this before so if tests are green then lgtm.

@danielcweeks danielcweeks merged commit 980b515 into apache:master Jun 3, 2022
namrathamyske pushed a commit to namrathamyske/iceberg that referenced this pull request Jul 10, 2022
…apache#4957)

* Use CatalogUtil classloader instead of context classloader for FileIO

* Use AwsClientFactories classloader for loading custom client factory

* Set classloader for S3FileIO metrics dynamic loading
namrathamyske pushed a commit to namrathamyske/iceberg that referenced this pull request Jul 10, 2022
…apache#4957)

* Use CatalogUtil classloader instead of context classloader for FileIO

* Use AwsClientFactories classloader for loading custom client factory

* Set classloader for S3FileIO metrics dynamic loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants