Hao Hao has uploaded this change for review. ( 
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 cause a request to fail
in cases when masters were in the process of a leader selection even
the client has valid authentication tokens, since a non-leader master
only has self-signed cert if it has never been run as a leader
(KUDU-2265).

This patch makes NOT_AUTHORIZED a recoverable exception and retry the
request as long as the original call has not timed out. Corresponding
test is added in TestSecurity.

Change-Id: Ia39a8d77cbf58c6f2f1f97eaf5e2e17ac1fa09fa
---
M java/kudu-client/src/main/java/org/apache/kudu/client/Negotiator.java
A 
java/kudu-client/src/main/java/org/apache/kudu/client/NotAuthorizedException.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestSecurity.java
3 files changed, 83 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/88/9088/1
--
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: newchange
Gerrit-Change-Id: Ia39a8d77cbf58c6f2f1f97eaf5e2e17ac1fa09fa
Gerrit-Change-Number: 9088
Gerrit-PatchSet: 1
Gerrit-Owner: Hao Hao <[email protected]>

Reply via email to