spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerryshao <...@git.apache.org>
Subject [GitHub] spark pull request #14065: [SPARK-14743][YARN] Add a configurable token mana...
Date Wed, 20 Jul 2016 07:57:01 GMT
Github user jerryshao commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14065#discussion_r71480635
  
    --- 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 --
    
    Yes, this is a valid concern, I'm also thinking about this, I will try to improve this.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message