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

    https://github.com/apache/spark/pull/17723#discussion_r117844961
  
    --- Diff: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/security/YARNHadoopAccessManager.scala
 ---
    @@ -100,21 +81,4 @@ private[security] class HadoopFSCredentialProvider
         }
       }
     
    -  private def getTokenRenewer(conf: Configuration): String = {
    -    val delegTokenRenewer = Master.getMasterPrincipal(conf)
    -    logDebug("delegation token renewer is: " + delegTokenRenewer)
    -    if (delegTokenRenewer == null || delegTokenRenewer.length() == 0) {
    -      val errorMessage = "Can't get Master Kerberos principal for use as 
renewer"
    -      logError(errorMessage)
    -      throw new SparkException(errorMessage)
    -    }
    -
    -    delegTokenRenewer
    -  }
    -
    -  private def hadoopFSsToAccess(hadoopConf: Configuration, sparkConf: 
SparkConf): Set[Path] = {
    -    sparkConf.get(FILESYSTEMS_TO_ACCESS).map(new Path(_)).toSet +
    -      sparkConf.get(STAGING_DIR).map(new Path(_))
    -        .getOrElse(FileSystem.get(hadoopConf).getHomeDirectory)
    --- End diff --
    
    Not sure why it's this way, but I agree with what you're suggesting. It 
probably would cause some minor overhead since you'd have the same NN address 
twice on the list, but the HDFS library probably optimizes for that (as in it 
doesn't try to fetch a new delegation token for the second time the same 
address shows up on the list).


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