Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14065#discussion_r71348341
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
    @@ -390,8 +391,21 @@ private[spark] class Client(
         // Upload Spark and the application JAR to the remote file system if 
necessary,
         // and add them as local resources to the application master.
         val fs = destDir.getFileSystem(hadoopConf)
    -    val nns = YarnSparkHadoopUtil.get.getNameNodesToAccess(sparkConf) + 
destDir
    -    YarnSparkHadoopUtil.get.obtainTokensForNamenodes(nns, hadoopConf, 
credentials)
    +
    +    // Merge credentials obtained from registered providers
    +    val nearestTimeOfNextRenewal = 
credentialManager.obtainCredentials(hadoopConf, credentials)
    +
    +    // If we use principal and keytab to login, also credentials can be 
renewed some time
    +    // after current time, we should pass the next renewal and updating 
time to delegation token
    +    // renewer and updater.
    +    if (loginFromKeytab && nearestTimeOfNextRenewal > 
System.currentTimeMillis() &&
    +      nearestTimeOfNextRenewal != Long.MaxValue) {
    +      sparkConf.set(CREDENTIALS_RENEWAL_TIME, nearestTimeOfNextRenewal)
    +      val nearestTimeOfNextUpdate =
    +        (nearestTimeOfNextRenewal - System.currentTimeMillis()) * 1.1 + 
System.currentTimeMillis()
    --- End diff --
    
    what is the 1.1 here? just some time slightly in the future for executors 
to fetch?  Note that if they really return the time to renew from obtainTokens 
this could be to late.  With hdfs with return 75% of renew time. We either need 
to make sure to document the user should do something similar or we need to 
handle here.  Its probably safer to handle here.  The only downside would be if 
they make renewal interval really really small.  We should probably put 
warning/documentation in around obtain tokens about that too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to