You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ul...@apache.org on 2021/11/30 09:11:40 UTC

[incubator-kyuubi] 01/01: improve log

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

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

commit 3c9ae3702987da4d846cb536eef9f91d1282ac31
Author: ulysses-you <ul...@gmail.com>
AuthorDate: Tue Nov 30 17:10:45 2021 +0800

    improve log
---
 .../org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala      | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
index 9fd5812..b78a5ad 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
@@ -184,7 +184,13 @@ class SparkProcessBuilder(
       try {
         val ugi = UserGroupInformation
           .loginUserFromKeytabAndReturnUGI(principal.get, keytab.get)
-        ugi.getShortUserName == proxyUser
+        val keytabEnabled = ugi.getShortUserName == proxyUser
+        if (!keytabEnabled) {
+          warn(s"The session proxy user: $proxyUser is not same with " +
+            s"spark principal: ${ugi.getShortUserName}, so we can't support use keytab. " +
+            s"Fallback to use proxy user.")
+        }
+        keytabEnabled
       } catch {
         case e: IOException =>
           error(s"Failed to login for ${principal.get}", e)