sezruby opened a new pull request, #13810:
URL: https://github.com/apache/gluten/pull/13810

   ## What changes are proposed in this pull request?
   
   A native Delta write to an `abfs://` or `abfss://` path fails with
   
   ```
   Config fs.azure.account.key.<account>.dfs.core.windows.net not found
   ```
   
   when the Azure credentials are Hadoop settings, for example 
`spark.hadoop.fs.azure.account.key.<account>.dfs.core.windows.net` and 
`spark.hadoop.fs.azure.account.auth.type.<account>.dfs.core.windows.net=SharedKey`.
 Native reads of the same path work.
   
   **Cause.** A native Delta write opens its files with 
`VeloxFormatWriterInjects.createOutputWriter`, and 
`VeloxParquetDataSourceABFS::initSink` builds the ABFS client from the settings 
the data source gets at init. Those are the write options (`nativeConf`) plus 
the runtime's session conf, which keeps only the keys listed in 
`GlutenConfig.getNativeSessionConf`. The `spark.hadoop.fs.azure.*` settings are 
passed only in the backend conf (`getNativeBackendConf`), which native reads 
use. So the writer never sees the credentials.
   
   **Change.** For abfs paths, `createOutputWriter` adds the write's 
`fs.azure.*` Hadoop settings (from the task's Hadoop configuration) to the 
native writer's settings as `spark.hadoop.fs.azure.*`, the keys the native ABFS 
file system reads. A setting the write already has is kept. Other paths are 
unchanged. A native write of a Parquet table (`WriteFilesExecTransformer`) 
passes its settings differently and is not changed here.
   
   Related: #10794 (a different error on ABFS writes).
   
   ## How was this patch tested?
   
   - New `VeloxFormatWriterInjectsSuite` (3 tests): an `abfss://` write gets 
the `fs.azure.*` settings with the `spark.hadoop.` prefix (and not other file 
systems' settings) without changing the write's own map; a setting the write 
already has is kept; `file:`, `s3a:` and `hdfs:` writes get their settings 
unchanged. Passes locally.
   - Native Delta writes (a DELETE that rewrites a partitioned table) to 
`abfss://` with a shared-key account, on an 8-executor Linux cluster with the 
Spark 3.5 bundle jar: failed with the error above without this change, and 
succeeded with it.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to