virajjasani commented on pull request #3788:
URL: https://github.com/apache/hadoop/pull/3788#issuecomment-991852477


   Tried setting OAuth with Msi Token provider but looks like I am missing some 
config.
   
   If I use these configs, 
   
   ```
       <property>
           <name>fs.azure.account.auth.type.abfsuswest1</name>
           <value>OAuth</value>
           <description>The authorization type can be SharedKey, OAuth, Custom 
or SAS. The
               default is SharedKey.</description>
       </property>
   
       <property>
         <name>fs.azure.account.oauth.provider.type.abfsuswest1</name>
         <value>org.apache.hadoop.fs.azurebfs.oauth2.MsiTokenProvider</value>
         <description>The full name of token provider class name.</description>
       </property>
   
       <property>
           <name>fs.azure.account.oauth2.msi.tenant.abfsuswest1</name>
           <value>${value}</value>
           <description>msi tenantGuid.</description>
       </property>
   
       <property>
           <name>fs.azure.account.oauth2.client.id.abfsuswest1</name>
           <value>${value}</value>
           <description>AAD client id.</description>
       </property>
   
   ```
   
   I get this error:
   ```
     <testcase name="test" 
classname="org.apache.hadoop.fs.azurebfs.ITestAbfsMsiTokenProvider" time="0">
       <skipped message="Not set: fs.azure.account.oauth.provider.type"/>
     </testcase>
   ```
   
   However, adding `fs.azure.account.oauth.provider.type` with value 
`org.apache.hadoop.fs.azurebfs.oauth2.MsiTokenProvider` results in error:
   
   ```
   [INFO] Running org.apache.hadoop.fs.azurebfs.ITestAbfsMsiTokenProvider
   [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
0.382 s <<< FAILURE! - in 
org.apache.hadoop.fs.azurebfs.ITestAbfsMsiTokenProvider
   [ERROR] test(org.apache.hadoop.fs.azurebfs.ITestAbfsMsiTokenProvider)  Time 
elapsed: 0.309 s  <<< ERROR!
   java.lang.IllegalArgumentException: Illegal character in authority at index 
8: abfss://abfs-testcontainer-db25b542-c2c9-4a07-b1da-e69d40f61d36@{account 
name}.dfs.core.windows.net
        at java.net.URI.create(URI.java:852)
        at 
org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.initialize(AzureBlobFileSystem.java:155)
        at 
org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3459)
        at org.apache.hadoop.fs.FileSystem.access$300(FileSystem.java:171)
        at 
org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3564)
        at org.apache.hadoop.fs.FileSystem$Cache.getUnique(FileSystem.java:3517)
        at org.apache.hadoop.fs.FileSystem.newInstance(FileSystem.java:591)
        at org.apache.hadoop.fs.FileSystem.newInstance(FileSystem.java:603)
        at 
org.apache.hadoop.fs.azurebfs.AbstractAbfsIntegrationTest.createFileSystem(AbstractAbfsIntegrationTest.java:303)
        at 
org.apache.hadoop.fs.azurebfs.AbstractAbfsIntegrationTest.setup(AbstractAbfsIntegrationTest.java:174)
   ```
   
   Is this a known issue with some missing config while running test?
   
   mvn command:
   ```
   $ mvn -T 1C clean verify -Dtest=none -Dit.test=ITestAbfsMsiTokenProvider
   ```


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