[ 
https://issues.apache.org/jira/browse/HADOOP-15694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16612708#comment-16612708
 ] 

Thomas Marquardt commented on HADOOP-15694:
-------------------------------------------

Thanks Sean, it is great that you already run all the tests.  We're following 
this process across the board, so anyone who submits patches should paste the 
summary results from the test run, similar to what Da did above.  It is just 
proof that the tests were run and helps us keep the builds in good shape. 

I was about to push the change, but noticed that 
TestAbfsConfigurationFieldsValidation.testGetAccountKeyWithNonExistingAccountName
 fails when I my configuration has an account-agnostic storage key:
{code:java}
[ERROR] 
testGetAccountKeyWithNonExistingAccountName(org.apache.hadoop.fs.azurebfs.TestAbfsConfigurationFieldsValidation)
 Time elapsed: 0.019 s <<< FAILURE!
java.lang.AssertionError: Expected exception: 
org.apache.hadoop.fs.azurebfs.contracts.exceptions.ConfigurationPropertyNotFoundException
at 
org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:32)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
{code}
The test is expecting a ConfigurationPropertyNotFoundException, but due to my 
config it does not throw.

 

The following code fixes the test. Note that is also does not modify the 
TestAbfsConfigurationFieldsValidation.abfsConfiguration member field, but 
instead uses a local variable:
{code:java}
@Test(expected = ConfigurationPropertyNotFoundException.class)
public void testGetAccountKeyWithNonExistingAccountName() throws Exception {
  Configuration configuration = new Configuration();
  configuration.addResource(TestConfigurationKeys.TEST_CONFIGURATION_FILE_NAME);
  configuration.unset(ConfigurationKeys.FS_AZURE_ACCOUNT_KEY_PROPERTY_NAME);
  AbfsConfiguration abfsConfig = new AbfsConfiguration(configuration, 
"bogusAccountName");
  abfsConfig.getStorageAccountKey();
}
{code}

> ABFS: Allow OAuth credentials to not be tied to accounts
> --------------------------------------------------------
>
>                 Key: HADOOP-15694
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15694
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Sean Mackrory
>            Assignee: Sean Mackrory
>            Priority: Major
>         Attachments: HADOOP-15694-HADOOP-15407-005.patch, 
> HADOOP-15694-HADOOP-15407.003.patch, HADOOP-15694-HADOOP-15407.004.patch, 
> HADOOP-15694-HADOOP-15407.006.patch, HADOOP-15694-HADOOP-15407.007.patch, 
> HADOOP-15694.001.patch, HADOOP-15694.002.patch, HADOOP-15694.003.patch
>
>
> Now that there's OAuth support, it's possible to have a notion of identity 
> that's distinct from the account itself. If a cluster is configured via OAuth 
> with it's own identity, it's likely operators will want to use that identity 
> regardless of which storage account a job uses.
> So OAuth configs right now (and probably others) are looked up with 
> <config_key>.<account>. I propose that we add a function for looking up these 
> configs that returns an account-specific value if it exists, but in the event 
> it does not will also try to return <config_key>, if that exists.
> I can work on a patch for this if nobody has any objections.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to