Skip to content

feat(io): accept the Java ADLS connection string endpoints - #4609

Open
Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:feat/4140-adls-connection-string
Open

Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:feat/4140-adls-connection-string

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown
Contributor

Part of #4140

Rationale for this change

Java accepts adls.connection-string.<host>, keyed by the location host such as account.dfs.core.windows.net, and applies the value as the endpoint for that host in AzureProperties.applyClientConfiguration. The fsspec backend only read a single adls.connection-string and never resolved the per-host form.

This change reads adls.connection-string.<host> using the location host and passes it to adlfs as account_host, which is adlfs's per-account endpoint setting. The value can be a full endpoint URL or a bare host. The single adls.connection-string keeps its existing connection string semantics.

Are these changes tested?

Added tests for an endpoint with a scheme, an endpoint without a scheme, and for a key that names the bare account instead of the host, which must not match.

Are there any user-facing changes?

Yes. Java per-host ADLS endpoint properties are accepted by the fsspec backend.

Split from #4596.

Java keys adls.connection-string.<host> by the location host, and the value is the endpoint for that host, not an Azure connection string. Resolve it per location and pass the endpoint to adlfs as account_host.

@Fokko Fokko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @Anurag-S1ngh! Verified against Java: AzureProperties.applyClientConfiguration does adlsConnectionStrings.get(account) and passes the value to builder.endpoint(...), so treating adls.connection-string.<host> as an endpoint matches. New tests pass locally too.

One question on pyiceberg/io/fsspec.py:305: if both adls.connection-string and adls.connection-string.<host> are set, adlfs checks connection_string first and silently ignores account_host, while Java would apply the per-host endpoint. Is this on purpose? Not blocking either way.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants