You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Da Zhou (JIRA)" <ji...@apache.org> on 2018/10/03 23:31:00 UTC

[jira] [Commented] (HADOOP-15809) ABFS: better exception handling when making getAccessToken call

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

Da Zhou commented on HADOOP-15809:
----------------------------------

Uploading 001 patch:
 - in *getTokenSingleCall(),* when get a failure response, consume *errorStream*.
 - Once get a *HttpException* when executing *AbfsRestOperation*, *stop retry*. The reason is because HttpException can only be thrown from getTokenSingleCall() when the retry policy in AzureADAuthenticator determines there is no need to retry.
 - Wrap the *HttpException* into a *AbfsRestOperationException*.

Tests passed:
 Namespace enabled account, using Oauth:
 Tests run: 35, Failures: 0, Errors: 0, Skipped: 0
 Tests run: 307, Failures: 0, Errors: 0, Skipped: 35
 Tests run: 165, Failures: 0, Errors: 0, Skipped: 21

Namespace not enabled account, using Shared Key:
 Tests run: 35, Failures: 0, Errors: 0, Skipped: 0
 Tests run: 307, Failures: 0, Errors: 0, Skipped: 199
 Tests run: 165, Failures: 0, Errors: 0, Skipped: 15

> ABFS: better exception handling when making getAccessToken call
> ---------------------------------------------------------------
>
>                 Key: HADOOP-15809
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15809
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>    Affects Versions: 3.2.0
>            Reporter: Da Zhou
>            Assignee: Da Zhou
>            Priority: Major
>         Attachments: HADOOP-15809-001.patch
>
>
> Currently in *getTokenSingleCall()*: if it get a HTTP failure response, it tries to consume inputStream in httpUrlConnection, which will *always* lead to an *IOException* and this exception never get checked in *AzureADAuthenticator*. 
>  As a result the httpStatus code is never checked in the retry policy of AzureADAuthenticator. Tthat IOException will be caught by AbfsRestOperation, which will keep on retrying.



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

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