Todd Lipcon has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/9832


Change subject: KUDU-2379. java: exportAuthenticationCredentials must connect 
to the cluster
......................................................................

KUDU-2379. java: exportAuthenticationCredentials must connect to the cluster

In the case that exportAuthenticationCredentials is called before the
client has connected to the cluster, it needs to trigger a connection in
order to obtain credentials. KUDU-2259 broke this when it changed
exportAuthenticationCredentials() to return a non-null credential in
this case.

The fix just tracks whether the client has successfully connected to a
cluster, and if it has not, makes sure that it has done so before
generating credentials.

Tested manually using spark2-submit against a secure cluster. Prior to
this fix, it did not succeed. A new unit test is included as well.

Change-Id: Icd1b69abadb4b9c97f6c8f7ed38897c33ca7ff72
Reviewed-on: http://gerrit.cloudera.org:8080/9814
Reviewed-by: Hao Hao <[email protected]>
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <[email protected]>
(cherry picked from commit aa94d16fda6cd6f3f413decf46bf9353680480c7)
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
M java/kudu-client/src/main/java/org/apache/kudu/client/SecurityContext.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestSecurity.java
3 files changed, 38 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/32/9832/1
--
To view, visit http://gerrit.cloudera.org:8080/9832
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.7.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd1b69abadb4b9c97f6c8f7ed38897c33ca7ff72
Gerrit-Change-Number: 9832
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <[email protected]>

Reply via email to