This is an automated email from the ASF dual-hosted git repository.

ulyssesyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new daa5bfedb [KYUUBI #2643][FOLLOWUP] Using javax AuthenticationException 
instead of hadoop AuthenticationException
daa5bfedb is described below

commit daa5bfedb3de42793ce3f561f5014d5341691ee2
Author: Fei Wang <[email protected]>
AuthorDate: Wed Jun 8 10:53:44 2022 +0800

    [KYUUBI #2643][FOLLOWUP] Using javax AuthenticationException instead of 
hadoop AuthenticationException
    
    ### _Why are the changes needed?_
    
    Using javax.security.sasl.AuthenticationException instead of hadoop 
AuthenticationException
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run 
test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests)
 locally before make a pull request
    
    Closes #2787 from turboFei/auth_ex.
    
    Closes #2643
    
    796ff2ee [Fei Wang] [KYUUBI #2643][FOLLOWUP] Using 
javax.security.sasl.AuthenticationException instead of hadoop 
AuthenticationException
    
    Authored-by: Fei Wang <[email protected]>
    Signed-off-by: ulysses-you <[email protected]>
---
 .../src/main/java/org/apache/kyuubi/client/util/AuthUtil.java         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/util/AuthUtil.java 
b/kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/util/AuthUtil.java
index 62a99de7d..9d4e36934 100644
--- 
a/kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/util/AuthUtil.java
+++ 
b/kyuubi-rest-client/src/main/java/org/apache/kyuubi/client/util/AuthUtil.java
@@ -21,8 +21,8 @@ import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.security.PrivilegedExceptionAction;
 import java.util.Base64;
+import javax.security.sasl.AuthenticationException;
 import org.apache.hadoop.security.UserGroupInformation;
-import 
org.apache.hadoop.security.authentication.client.AuthenticationException;
 import org.ietf.jgss.GSSContext;
 import org.ietf.jgss.GSSException;
 import org.ietf.jgss.GSSManager;
@@ -74,7 +74,7 @@ public final class AuthUtil {
                       Base64.getEncoder().encode(outToken), 
StandardCharsets.US_ASCII);
                 } catch (GSSException e) {
                   LOG.error("Error: ", e);
-                  throw new AuthenticationException(e);
+                  throw new AuthenticationException("Failed to generate 
token", e);
                 }
               }
             });

Reply via email to