MaxGekk commented on pull request #29976:
URL: https://github.com/apache/spark/pull/29976#issuecomment-705780596


   @dongjoon-hyun Can this be merged to `branch-3.0` (maybe 2.4 too) since it 
can be considered as a bug fix?
   Here is a real use case, a customer tries to read files in Azure Data Lake:
   ```
   def hadoopConf1() = Map[String, String](
     s"fs.adl.oauth2.access.token.provider.type" -> "ClientCredential",
     s"fs.adl.oauth2.client.id" -> dbutils.secrets.get(scope = "...", key = 
"..."),
     s"fs.adl.oauth2.credential" -> dbutils.secrets.get(scope = "...", key = 
"..."),
     s"fs.adl.oauth2.refresh.url" -> 
s"https://login.microsoftonline.com/.../oauth2/token";)
   val df = 
spark.read.format("...").options(hadoopConf1).load("adl://....azuredatalakestore.net/foldersp1/...")
   ```
   but gets the following exception because the settings above are not 
propagated to the filesystem:
   ```
   java.lang.IllegalArgumentException: No value for 
fs.adl.oauth2.access.token.provider found in conf file.
        at ....adl.AdlFileSystem.getNonEmptyVal(AdlFileSystem.java:820)
        at 
....adl.AdlFileSystem.getCustomAccessTokenProvider(AdlFileSystem.java:220)
        at ....adl.AdlFileSystem.getAccessTokenProvider(AdlFileSystem.java:257)
        at ....adl.AdlFileSystem.initialize(AdlFileSystem.java:164)
        at 
org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2669)
   ```


----------------------------------------------------------------
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.

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