vanzin 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_r249135927
##########
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:
> for the case where I use the TGT and --conf
spark.kerberos.renewal.credentials=ccache
Ah, that makes more sense. I'm testing on CDH, which is based on 2.6 but has
a lot of patches including HADOOP-7930, so I don't see that message.
Anyway, since all Hadoop libs I looked at seem to take care of keeping the
TGT up-to-date, I'll remove this code, and we can re-introduce it later if
needed.
----------------------------------------------------------------
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]