spark-reviews mailing list archives

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

    https://github.com/apache/spark/pull/14065#discussion_r71047809
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/security/AMDelegationTokenRenewer.scala
---
    @@ -171,10 +175,13 @@ private[yarn] class AMDelegationTokenRenewer(
         keytabLoggedInUGI.doAs(new PrivilegedExceptionAction[Void] {
           // Get a copy of the credentials
           override def run(): Void = {
    -        val nns = YarnSparkHadoopUtil.get.getNameNodesToAccess(sparkConf) + dst
    -        hadoopUtil.obtainTokensForNamenodes(nns, freshHadoopConf, tempCreds)
    -        hadoopUtil.obtainTokenForHiveMetastore(sparkConf, freshHadoopConf, tempCreds)
    -        hadoopUtil.obtainTokenForHBase(sparkConf, freshHadoopConf, tempCreds)
    +        var nearestNextTime = Long.MaxValue
    +        credentialManager.obtainCredentials(freshHadoopConf, tempCreds).foreach { nextTime
=>
    --- End diff --
    
    I also noticed that the logic will renew all tokens when the first token needs renewal.
It's probably fine since this should happen very rarely (once every few days). But that also
means that `obtainCredentialsFromService` is completely unused and can be deleted.


---
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