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

Support WASB scheme in ADLSFileIO #11830

Merged
merged 5 commits into from
Jan 20, 2025

Conversation

mrcnc
Copy link
Contributor

@mrcnc mrcnc commented Dec 19, 2024

This is my third attempt to resolve #10127 (...third time's the charm 😉)

We needed to revert #11504 since it introduced a breaking change for ADLSFileIO clients that were using SAS tokens. This PR fixes the issue by introducing a new host() method to ADLSLocation and uses it in ADLSFileIO when calling applyClientConfiguration.

@mrcnc mrcnc marked this pull request as ready for review December 19, 2024 23:27
Comment on lines +66 to +67
"wasb", ADLS_FILE_IO_IMPL,
"wasbs", ADLS_FILE_IO_IMPL);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would like to verify that updating this default behavior of ResolvingFileIO is not considered a breaking change, since it could potentially force clients using the WASB scheme with HadoopFileIO to update their configuration. For example, if clients are currently using SAS tokens in an core-site.xml file, then it seems they need to either configure these in the AzureProperties for ADLSFileIO or explicitly configure HadoopFileIO as the implementation to get the same behavior.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not completely sure I follow the concern, if a client is using WASB + HadoopFileIO this means they explicitly configured it or are using a catalog which defaults to using HadoopFileIO (e.g. the HadoopCatalog).

Adding this scheme mapping to ResolvingFileIO just makes it so that when ResolvingFileIO is configured or defaulted to, if a path with "wasb/wasbs" is encountered, we initialize the ADLS file IO. It shouldn't impact a user who has already either explicitly configured HadoopFileIO or is defaulting to that. Unless I'm missing something cc @danielcweeks @bryanck

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see the JdbcCatalog uses HadoopFileIO by default so it wouldn't affect these users, but it would affect the REST Catalog which defaults to ResolvingFileIO. Maybe this is ok but needs to be added to release notes for 1.8.0? If not, we can remove it for now or activate this behavior explicitly with another setting?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's actually important to update the mapping (so imo what's here is correct). I think ResolvingFileIO should always only fallback to HadoopFileIO as a last resort, and in this case we do want wasb/wasbs to resolve to ADLS so that any custom integrations that happens in Iceberg in the ADLSFileIO implementation can be taken advantage of. At the same time we should document it.

In general, I feel like we shouldn't design for the case where a user relies on ResolvingFileIO's fallback HadoopFileIO

Copy link
Member

Choose a reason for hiding this comment

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

The mapping should be updated imho. This change makes sense to me here.

@jbonofre jbonofre self-requested a review December 20, 2024 15:43
@RussellSpitzer RussellSpitzer added this to the Iceberg 1.8.0 milestone Jan 13, 2025
Comment on lines +66 to +67
"wasb", ADLS_FILE_IO_IMPL,
"wasbs", ADLS_FILE_IO_IMPL);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not completely sure I follow the concern, if a client is using WASB + HadoopFileIO this means they explicitly configured it or are using a catalog which defaults to using HadoopFileIO (e.g. the HadoopCatalog).

Adding this scheme mapping to ResolvingFileIO just makes it so that when ResolvingFileIO is configured or defaulted to, if a path with "wasb/wasbs" is encountered, we initialize the ADLS file IO. It shouldn't impact a user who has already either explicitly configured HadoopFileIO or is defaulting to that. Unless I'm missing something cc @danielcweeks @bryanck

@ajreid21
Copy link
Contributor

From a breaking change perspective, this looks okay to me now.

Is there future intent to use the storageAccount/storageAccountName? Otherwise, it's not being used currently but we're still parsing and storing it.

@mrcnc mrcnc force-pushed the support-wasb-for-adlsfileio branch from 2f4c94c to e6d6c72 Compare January 16, 2025 20:19
@mrcnc
Copy link
Contributor Author

mrcnc commented Jan 16, 2025

Is there future intent to use the storageAccount/storageAccountName? Otherwise, it's not being used currently but we're still parsing and storing it.

I don't have any future plans currently but think it's probably ok to leave it. One potential use case is if we wanted to override toString() to return the fully qualified URI

Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar left a comment

Choose a reason for hiding this comment

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

LGTM, @mrcnc thanks for this! I'll wait a bit in case @jbonofre wanted to review.

Comment on lines +66 to +67
"wasb", ADLS_FILE_IO_IMPL,
"wasbs", ADLS_FILE_IO_IMPL);
Copy link
Member

Choose a reason for hiding this comment

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

The mapping should be updated imho. This change makes sense to me here.

@amogh-jahagirdar
Copy link
Contributor

amogh-jahagirdar commented Jan 20, 2025

Thanks for the change @mrcnc , and thank you for reviewing @jbonofre @ajreid21 !

@amogh-jahagirdar amogh-jahagirdar merged commit b07455a into apache:main Jan 20, 2025
46 checks passed
@mrcnc mrcnc deleted the support-wasb-for-adlsfileio branch January 21, 2025 16:50
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.

Enable reading WASB and WASBS file paths with ABFS and ABFSS
5 participants