[
https://issues.apache.org/jira/browse/HADOOP-13103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15273003#comment-15273003
]
Tsz Wo Nicholas Sze commented on HADOOP-13103:
----------------------------------------------
> ... The old code had one attempt outside the while loop and then up to 3
> more attempts inside the while loop. With this patch, all attempts are
> collapsed into a single for loop with up to 3 iterations. ...
Good observation. I intentionally make such change so that it can fail fast.
For the exception cases I saw, the first try may fail with various reasons
(such as connection timeout). Then, the second try always success since it
reestablishes the connection. The third try is almost redundant but let's give
it a try. It is unlikely that the third try will success after the first and
the second tries have failed.) The fourth try is just wasting time.
Will update the patch to fix the unit test.
> Group resolution from LDAP may fail on
> javax.naming.ServiceUnavailableException
> -------------------------------------------------------------------------------
>
> Key: HADOOP-13103
> URL: https://issues.apache.org/jira/browse/HADOOP-13103
> Project: Hadoop Common
> Issue Type: Improvement
> Components: security
> Reporter: Tsz Wo Nicholas Sze
> Assignee: Tsz Wo Nicholas Sze
> Priority: Minor
> Attachments: c13103_20160505.patch
>
>
> According to the
> [javadoc|https://docs.oracle.com/javase/7/docs/api/javax/naming/ServiceUnavailableException.html],
> ServiceUnavailableException is thrown when attempting to communicate with a
> directory or naming service and that service is not available. It might be
> unavailable for different reasons. For example, the server might be too busy
> to service the request, or the server might not be registered to service any
> requests, etc.
> We should retry on it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]