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

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

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


   @steveloughran 
   
   Tested commit 4b82454546a25f60736708cd8c3a04ee98c2193a.
   
   **NonHNS-SharedKey** tests. 
   
   Storage account is in West US 2.
   I checked the logs to make sure the integration tests ran.
   
   ```
   ivan:/tmp/hadoop/hadoop-tools/hadoop-azure$ 
dev-support/testrun-scripts/runtests.sh -c "NonHNS-SharedKey"
   [INFO] Scanning for projects...
   [INFO] 
------------------------------------------------------------------------
   [INFO] Detecting the operating system and CPU architecture
   [INFO] 
------------------------------------------------------------------------
   ...
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  7.542 s
   [INFO] Finished at: 2021-05-31T15:18:55Z
   [INFO] 
------------------------------------------------------------------------
   
   Running the combination: NonHNS-SharedKey...
   ----- Test results -----
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 98, Failures: 0, Errors: 0, Skipped: 0
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 556, Failures: 0, Errors: 0, Skipped: 277
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 265, Failures: 0, Errors: 0, Skipped: 40
   
   Time taken: 10 mins 30 secs.
   Find test logs for the combination (NonHNS-SharedKey) in: 
dev-support/testlogs/2021-05-31_15-18-55/Test-Logs-NonHNS-SharedKey.txt
   Find consolidated test results in: 
dev-support/testlogs/2021-05-31_15-18-55/Test-Results.txt
   ```
   
   
   **HNS-OAuth** tests.
   
   Storage account is in West US.
   I checked the logs to make sure the integration tests ran.
   
   ```
   ivan:/tmp/hadoop/hadoop-tools/hadoop-azure$ 
dev-support/testrun-scripts/runtests.sh -c "HNS-OAuth"
   [INFO] Scanning for projects...
   [INFO] 
------------------------------------------------------------------------
   [INFO] Detecting the operating system and CPU architecture
   [INFO] 
------------------------------------------------------------------------
   ...
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  7.714 s
   [INFO] Finished at: 2021-05-31T15:31:10Z
   [INFO] 
------------------------------------------------------------------------
   
   Running the combination: HNS-OAuth...
   ----- Test results -----
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 98, Failures: 0, Errors: 0, Skipped: 0
   [INFO] Results:
   [INFO] 
   [ERROR] Errors: 
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testCheckAccessForNonExistentFile »  
Unexp...
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionALL:293->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionEXECUTE:218->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionNONE:204->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionREAD:233->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionREADEXECUTE:263->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionWRITE:248->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionWRITEEXECUTE:278->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testWhenCheckAccessConfigIsOff:141->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemOauth.testBlobDataContributor:76->getBlobConributor:175->AbstractAbfsIntegrationTest.getFileSystem:254
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemOauth.testBlobDataReader:128->getBlobReader:183->AbstractAbfsIntegrationTest.getFileSystem:254
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFilesystemAcl.testEnsureAclOperationWorksForRoot:1261 » 
AccessDenied
   [INFO] 
   [ERROR] Tests run: 556, Failures: 0, Errors: 12, Skipped: 98
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 265, Failures: 0, Errors: 0, Skipped: 52
   
   Time taken: 11 mins 35 secs.
   Find test logs for the combination (HNS-OAuth) in: 
dev-support/testlogs/2021-05-31_15-31-10/Test-Logs-HNS-OAuth.txt
   Find consolidated test results in: 
dev-support/testlogs/2021-05-31_15-31-10/Test-Results.txt
   ```
   
   The failures are due to the fact that I forgot to configure CheckAccess part 
of the azure-auth-keys.xml.
   
   
   **HNS-SharedKey** tests.
   
   Storage account is in West US.
   I checked the logs to make sure the integration tests ran.
   
   ```
   ivan:/tmp/hadoop/hadoop-tools/hadoop-azure$ 
dev-support/testrun-scripts/runtests.sh -c "HNS-SharedKey"
   [INFO] Scanning for projects...
   [INFO] 
------------------------------------------------------------------------
   [INFO] Detecting the operating system and CPU architecture
   [INFO] 
------------------------------------------------------------------------
   ...
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  7.696 s
   [INFO] Finished at: 2021-05-31T15:44:45Z
   [INFO] 
------------------------------------------------------------------------
   
   Running the combination: HNS-SharedKey...
   ----- Test results -----
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 98, Failures: 0, Errors: 0, Skipped: 0
   [INFO] Results:
   [INFO] 
   [ERROR] Failures: 
   [ERROR]   
ITestAbfsRestOperationException.testCustomTokenFetchRetryCount:93->testWithDifferentCustomTokenFetchRetry:122->Assert.assertTrue:42->Assert.fail:89
 Number of token fetch retries (4) done, does not match with 
fs.azure.custom.token.fetch.retry.count configured (0)
   [ERROR] Errors: 
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testCheckAccessForNonExistentFile »  
Unexp...
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionALL:293->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionEXECUTE:218->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionNONE:204->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionREAD:233->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionREADEXECUTE:263->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionWRITE:248->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testFsActionWRITEEXECUTE:278->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [ERROR]   
ITestAzureBlobFileSystemCheckAccess.testWhenCheckAccessConfigIsOff:141->setupTestDirectoryAndUserAccess:357->modifyAcl:348
 » AbfsRestOperation
   [INFO] 
   [ERROR] Tests run: 556, Failures: 1, Errors: 9, Skipped: 67
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 265, Failures: 0, Errors: 0, Skipped: 40
   
   Time taken: 11 mins 8 secs.
   Find test logs for the combination (HNS-SharedKey) in: 
dev-support/testlogs/2021-05-31_15-44-45/Test-Logs-HNS-SharedKey.txt
   Find consolidated test results in: 
dev-support/testlogs/2021-05-31_15-44-45/Test-Results.txt
   ```
   
   The failures are due to the fact that I forgot to configure CheckAccess part 
of the azure-auth-keys.xml.


-- 
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: 604208)
    Time Spent: 5.5h  (was: 5h 20m)

> 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: 5.5h
>  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