sadikovi edited a comment on pull request #3041:
URL: https://github.com/apache/hadoop/pull/3041#issuecomment-850372026
Tested commit c8ed0cc25bd094240b6274df447bdc33aa93546c. Ran the following
code
```scala
import org.apache.hadoop.fs._
val conf = new Configuration()
conf.set("fs.azure.account.auth.type", "OAuth")
conf.set("fs.azure.account.oauth.provider.type",
"org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider")
conf.set("fs.azure.account.oauth2.client.id", "<client-id>")
//
conf.set("fs.azure.account.oauth2.client.secret.<account>.dfs.core.windows.net",
"<client-secret>")
// conf.set("fs.azure.account.oauth2.client.secret", "<client-secret>")
conf.set("fs.azure.account.oauth2.client.endpoint",
"https://login.microsoftonline.com/<endpoint>")
val path = new Path("abfss://<container>@<account>.dfs.core.windows.net/")
val fs = path.getFileSystem(conf)
fs.getFileStatus(path)
```
with the storage account in West US, everything seems to be work correctly.
If I comment out one or more configs, e.g. client-secret or client-id, the
error message is as follows:
```
TokenAccessProviderException: Unable to load OAuth token provider class.
...
Caused by: ConfigurationPropertyNotFoundException: Configuration property
fs.azure.account.oauth2.client.secret not found.
...
```
The code works when commenting out `fs.azure.account.oauth2.client.secret`
or `fs.azure.account.oauth2.client.secret.<account>.dfs.core.windows.net`, the
same is applicable to other configs.
--
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]