Repository navigation
feat(io): accept the Java ADLS connection string endpoints - #4609
Anurag-S1ngh wants to merge 1 commit into
Conversation
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
left a comment
There was a problem hiding this comment.
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.
|
Yes, on purpose. When both are set the plain connection string stays authoritative, which is adlfs's own precedence. Applying the per-host endpoint would mean parsing and rewriting the connection string to inject the endpoint, which I did not want to do silently. Java only has the per-host key, so this overlap is specific to pyiceberg. I can add a line to the docs making the precedence explicit if you prefer. |
Part of #4140
Rationale for this change
Java accepts
adls.connection-string.<host>, keyed by the location host such asaccount.dfs.core.windows.net, and applies the value as the endpoint for that host inAzureProperties.applyClientConfiguration. The fsspec backend only read a singleadls.connection-stringand never resolved the per-host form.This change reads
adls.connection-string.<host>using the location host and passes it to adlfs asaccount_host, which is adlfs's per-account endpoint setting. The value can be a full endpoint URL or a bare host. The singleadls.connection-stringkeeps 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.