sarutak commented on code in PR #57828:
URL: https://github.com/apache/spark/pull/57828#discussion_r3736570365
##########
core/src/main/scala/org/apache/spark/deploy/security/HadoopDelegationTokenManager.scala:
##########
@@ -111,7 +111,16 @@ private[spark] class HadoopDelegationTokenManager(
def renewalEnabled: Boolean = {
hasKerberosCredentials ||
(sparkConf.get(DIRECT_CREDENTIAL_PROVIDERS_ENABLED) &&
-
delegationTokenProviders.values.exists(_.delegationTokensRequired(sparkConf,
hadoopConf)))
+ delegationTokenProviders.values.exists { provider =>
+ try {
+ provider.delegationTokensRequired(sparkConf, hadoopConf)
+ } catch {
+ case e: Exception =>
Review Comment:
`Exception` also catches `InterruptedException`. Since
`HadoopDelegationTokenProvider` is a `@DeveloperApi` SPI, third-party
implementations of `delegationTokensRequired()` may throw
`InterruptedException`. In this case, the interrupt state will be silently
cleared. This can prevent the upper `updateTokensTask()` from detecting a
shutdown signal.
Other providers in this package (`HadoopFSDelegationTokenProvider`,
`HBaseDelegationTokenProvider`) use `NonFatal` for the same isolation pattern.
Should we align here as well?
```suggestion
} catch {
case NonFatal(e) =>
logWarning(log"Failed to determine whether credentials are
required from " +
log"${MDC(LogKeys.SERVICE_NAME, provider.serviceName)}.", e)
false
}
```
The same applies to the `isolateFailures=true` branch in
`obtainDelegationTokens`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]