Hao Hao has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/9088 )

Change subject: KUDU-2262: allow Java client to retry if no master is a leader
......................................................................

KUDU-2262: allow Java client to retry if no master is a leader

Currently, when authentication is required, the Java client will not
retry if encounters NOT_AUTHORIZED error. This causes a request to fail
in cases when masters are in the process of the very first leader
election after started up, even if the client has valid authentication
token. Since the non-leader masters only have self-signed cert.

This patch updates the logic to throw a recoverable exception if client
has valid secondary authn credentials (such as authn token), but it
does not have primary authn credentials (such as Kerberos creds), and
retry the request as long as the original call has not timed out.
Corresponding test is added.

Change-Id: Ia39a8d77cbf58c6f2f1f97eaf5e2e17ac1fa09fa
Reviewed-on: http://gerrit.cloudera.org:8080/9088
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Negotiator.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestSecurity.java
2 files changed, 38 insertions(+), 2 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Todd Lipcon: Looks good to me, but someone else must approve
  Alexey Serbin: Looks good to me, approved

--
To view, visit http://gerrit.cloudera.org:8080/9088
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia39a8d77cbf58c6f2f1f97eaf5e2e17ac1fa09fa
Gerrit-Change-Number: 9088
Gerrit-PatchSet: 5
Gerrit-Owner: Hao Hao <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Hao Hao <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to