You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/04/07 07:41:26 UTC

[GitHub] [incubator-kyuubi] zhouyifan279 commented on a diff in pull request #2286: [KYUUBI #2281] renewalExecutor should be stopped when Engine's side Delegation token is not supported

zhouyifan279 commented on code in PR #2286:
URL: https://github.com/apache/incubator-kyuubi/pull/2286#discussion_r844818570


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/credentials/HadoopCredentialsManager.scala:
##########
@@ -183,6 +184,10 @@ class HadoopCredentialsManager private (name: String) extends AbstractService(na
           warn(
             s"Failed to send new credentials to SQL engine through session $sessionId",
             exception)
+          if (DELEGATION_TOKEN_IS_NOT_SUPPORTED.equals(exception.getMessage)) {
+            stop()

Review Comment:
   It is an overkill to stop `HadoopCredentialManager` only because one of Kyuubi Engines does not support token renewal. This will result in token expiration of other Kyuubi Engines.
   
   I think we should handle this more carefully in one of these two ways:
   
   1. At Kyuubi Server side, decide whether to `sendCredentials` according to `kyuubi.engine.type`.
   2. At Kyuubi Engine side, `TFrontendService#RenewDelegationToken` returns SUCCESS_STATUS by default.
   
   By the first way, `HadoopCredentialManager` can maintain fewer userCredentials as currently only Spark Engine requires token renewal.
   
   The second way conforms better to Kyuubi's architecture, that is, keep engine specific codes at engine side.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org