[ 
https://issues.apache.org/jira/browse/HADOOP-17725?focusedWorklogId=604067&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-604067
 ]

ASF GitHub Bot logged work on HADOOP-17725:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/May/21 10:38
            Start Date: 31/May/21 10:38
    Worklog Time Spent: 10m 
      Work Description: sadikovi commented on pull request #3041:
URL: https://github.com/apache/hadoop/pull/3041#issuecomment-851397891


   @steveloughran
   
   I ran the tests using the following:
   ```
   mvn install -DskipTests
   cd hadoop-tools/hadoop-azure
   ./dev-support/testrun-scripts/runtests.sh
   ```
   
   Storage account is in West US and has HNS enabled. I configured all of the 
auth mechanisms in the `src/test/resources/azure-auth-keys.xml`. 
   
   I get the following output:
   ```
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  7.601 s
   [INFO] Finished at: 2021-05-31T10:32:23Z
   [INFO] 
------------------------------------------------------------------------
   
   Running the combination: HNS-OAuth...
   ----- Test results -----
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 98, Failures: 0, Errors: 0, Skipped: 20
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 556, Failures: 0, Errors: 0, Skipped: 556
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 264, Failures: 0, Errors: 0, Skipped: 264
   
   Time taken: 0 mins 52 secs.
   Find test logs for the combination (HNS-OAuth) in: 
dev-support/testlogs/2021-05-31_10-32-23/Test-Logs-HNS-OAuth.txt
   Find consolidated test results in: 
dev-support/testlogs/2021-05-31_10-32-23/Test-Results.txt
   ----------
   
   Running the combination: HNS-SharedKey...
   ----- Test results -----
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 98, Failures: 0, Errors: 0, Skipped: 20
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 556, Failures: 0, Errors: 0, Skipped: 556
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 264, Failures: 0, Errors: 0, Skipped: 264
   
   Time taken: 0 mins 52 secs.
   Find test logs for the combination (HNS-SharedKey) in: 
dev-support/testlogs/2021-05-31_10-32-23/Test-Logs-HNS-SharedKey.txt
   Find consolidated test results in: 
dev-support/testlogs/2021-05-31_10-32-23/Test-Results.txt
   ----------
   
   Running the combination: NonHNS-SharedKey...
   ----- Test results -----
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 98, Failures: 0, Errors: 0, Skipped: 20
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 556, Failures: 0, Errors: 0, Skipped: 556
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 264, Failures: 0, Errors: 0, Skipped: 264
   
   Time taken: 0 mins 53 secs.
   Find test logs for the combination (NonHNS-SharedKey) in: 
dev-support/testlogs/2021-05-31_10-32-23/Test-Logs-NonHNS-SharedKey.txt
   Find consolidated test results in: 
dev-support/testlogs/2021-05-31_10-32-23/Test-Results.txt
   ```
   
   I am not quite sure why the integration tests are ignored. Do you know how I 
can configure them to run?


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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 604067)
    Time Spent: 4h 20m  (was: 4h 10m)

> Improve error message for token providers in ABFS
> -------------------------------------------------
>
>                 Key: HADOOP-17725
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17725
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs/azure, hadoop-thirdparty
>    Affects Versions: 3.3.0
>            Reporter: Ivan
>            Assignee: Viraj Jasani
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> It would be good to improve error messages for token providers in ABFS. 
> Currently, when a configuration key is not found or mistyped, the error is 
> not very clear on what went wrong. It would be good to indicate that the key 
> was required but not found in Hadoop configuration when creating a token 
> provider.
> For example, when running the following code:
> {code:java}
> import org.apache.hadoop.conf._
> 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", "my-client-id")
> // 
> conf.set("fs.azure.account.oauth2.client.secret.my-account.dfs.core.windows.net",
>  "my-secret")
> conf.set("fs.azure.account.oauth2.client.endpoint", "my-endpoint")
> val path = new Path("abfss://[email protected]/")
> val fs = path.getFileSystem(conf)
> fs.getFileStatus(path){code}
> The following exception is thrown:
> {code:java}
> TokenAccessProviderException: Unable to load OAuth token provider class.
> ...
> Caused by: UncheckedExecutionException: java.lang.NullPointerException: 
> clientSecret
> ...
> Caused by: NullPointerException: clientSecret {code}
> which does not tell what configuration key was not loaded.
>  
> IMHO, it would be good if the exception was something like this:
> {code:java}
> TokenAccessProviderException: Unable to load OAuth token provider class.
> ...
> Caused by: ConfigurationPropertyNotFoundException: Configuration property 
> fs.azure.account.oauth2.client.secret not found. {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to