LucaCanali commented on a change in pull request #23525: [SPARK-26595][core] 
Allow credential renewal based on kerberos ticket cache.
URL: https://github.com/apache/spark/pull/23525#discussion_r247844744
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/deploy/security/HadoopDelegationTokenManager.scala
 ##########
 @@ -97,28 +106,37 @@ private[spark] class HadoopDelegationTokenManager(
       ThreadUtils.newDaemonSingleThreadScheduledExecutor("Credential Renewal 
Thread")
 
     val ugi = UserGroupInformation.getCurrentUser()
-    if (ugi.isFromKeytab()) {
+    val tgtRenewalTask = if (ugi.isFromKeytab()) {
       // In Hadoop 2.x, renewal of the keytab-based login seems to be 
automatic, but in Hadoop 3.x,
       // it is configurable (see 
hadoop.kerberos.keytab.login.autorenewal.enabled, added in
       // HADOOP-9567). This task will make sure that the user stays logged in 
regardless of that
       // configuration's value. Note that checkTGTAndReloginFromKeytab() is a 
no-op if the TGT does
       // not need to be renewed yet.
-      val tgtRenewalTask = new Runnable() {
+      new Runnable() {
         override def run(): Unit = {
           ugi.checkTGTAndReloginFromKeytab()
 
 Review comment:
   When testing this I get a warning message "WARN UserGroupInformation: Not 
attempting to re-login since the last re-login was attempted less than 600 
seconds before.." every minute (I am using the default value of 
spark.yarn.kerberos.relogin.period).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to