turboFei commented on a change in pull request #1289:
URL: https://github.com/apache/incubator-kyuubi/pull/1289#discussion_r735455814



##########
File path: 
kyuubi-server/src/main/scala/org/apache/kyuubi/server/KerberosTicketRefreshService.scala
##########
@@ -25,41 +25,41 @@ import org.apache.kyuubi.config.KyuubiConf
 import org.apache.kyuubi.service.AbstractService
 import org.apache.kyuubi.util.{KyuubiHadoopUtils, ThreadUtils}
 
-class KinitAuxiliaryService() extends AbstractService("KinitAuxiliaryService") 
{
+class KerberosTicketRefreshService() extends 
AbstractService("KerberosTicketRefreshService") {
 
   private val executor = 
ThreadUtils.newDaemonSingleThreadScheduledExecutor(getName)
 
-  private var kinitInterval: Long = _
-  private var kinitMaxAttempts: Int = _
-  @volatile private var kinitAttempts: Int = _
-
-  private var kinitTask: Runnable = _
+  private var refreshInterval: Long = _
+  private var keytabLoginMaxAttempts: Int = _
+  @volatile private var keytabLoginAttempts: Int = _
+  private var tgtRenewalTask: Runnable = _
 
   override def initialize(conf: KyuubiConf): Unit = {
     if (UserGroupInformation.isSecurityEnabled) {
       val keytab = conf.get(KyuubiConf.SERVER_KEYTAB)
       val principal = conf.get(KyuubiConf.SERVER_PRINCIPAL)
         .map(KyuubiHadoopUtils.getServerPrincipal)
-      kinitInterval = conf.get(KyuubiConf.KINIT_INTERVAL)
-      kinitMaxAttempts = conf.get(KyuubiConf.KINIT_MAX_ATTEMPTS)
+      refreshInterval = conf.get(KyuubiConf.KINIT_INTERVAL)
+      keytabLoginMaxAttempts = conf.get(KyuubiConf.KINIT_MAX_ATTEMPTS)
 
       require(keytab.nonEmpty && principal.nonEmpty, "principal or keytab is 
missing")
       UserGroupInformation.loginUserFromKeytab(principal.get, keytab.get)

Review comment:
       we need login here at first.
   
   Otherwise, there is delay for getting ticket, and the front end service will 
fail to start.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to