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_r248634712
##########
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:
Thanks @vanzin for the detailed explanations.
After some additional investigation I found that if I compile Spark with
Hadoop 3.1 the behavior is OK. I can still reproduce the issue I mentioned with
the standard 2.7 version in my environment. It appears that
`hadoop.kerberos.min.seconds.before.relogin` is not available in Hadoop 2.7 and
was introduced in 2.8?
----------------------------------------------------------------
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]