-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-15754] [yarn] Not letting the credentials containing hdfs delegation tokens to be added in current user credential. #13499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,9 +21,13 @@ import scala.collection.mutable.ArrayBuffer | |
|
|
||
| import org.apache.hadoop.yarn.api.records.YarnApplicationState | ||
|
|
||
| import org.apache.spark.{SparkContext, SparkException} | ||
| import org.apache.spark.deploy.yarn.{Client, ClientArguments, YarnSparkHadoopUtil} | ||
| import org.apache.spark.SparkContext | ||
| import org.apache.spark.SparkException | ||
| import org.apache.spark.deploy.yarn.Client | ||
| import org.apache.spark.deploy.yarn.ClientArguments | ||
| import org.apache.spark.deploy.yarn.YarnSparkHadoopUtil | ||
| import org.apache.spark.internal.Logging | ||
| import org.apache.spark.internal.config.PRINCIPAL | ||
| import org.apache.spark.launcher.SparkAppHandle | ||
| import org.apache.spark.scheduler.TaskSchedulerImpl | ||
|
|
||
|
|
@@ -64,7 +68,7 @@ private[spark] class YarnClientSchedulerBackend( | |
| // SPARK-8851: In yarn-client mode, the AM still does the credentials refresh. The driver | ||
| // reads the credentials from HDFS, just like the executors and updates its own credentials | ||
| // cache. | ||
| if (conf.contains("spark.yarn.credentials.file")) { | ||
| if (!conf.contains(PRINCIPAL.key) && conf.contains("spark.yarn.credentials.file")) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since you're touching this, you could also use BTW I'm not entirely sure why this change is needed, or related to the issue you reported. You want to start the token renewer code exactly when
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hi @vanzin
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a different issue, and I'm not sure it's really an issue, given what the comment above this line says. This code is here for when Spark is managing your kerberos credentials and delegation tokens, i.e., when you pass You're basically breaking that feature by changing this. If your app is managing the kerberos login, you'd never pass |
||
| YarnSparkHadoopUtil.get.startExecutorDelegationTokenRenewer(conf) | ||
| } | ||
| monitorThread = asyncMonitorApplication() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are unnecessary, and in fact we prefer the previous style.