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

    https://github.com/apache/spark/pull/9168#discussion_r42482462
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala 
---
    @@ -130,6 +132,20 @@ class SparkHadoopUtil extends Logging {
         UserGroupInformation.loginUserFromKeytab(principalName, keytabFilename)
       }
     
    +  def updateCurrentUserHDFSDelegationToken(): Unit = {
    +    val conf = new Configuration()
    +    val nsId = DFSUtil.getNamenodeNameServiceId(conf)
    +    val isHaEnabled = HAUtil.isHAEnabled(conf, nsId)
    +
    +    if(isHaEnabled){
    +      val ugi = UserGroupInformation.getCurrentUser
    +      val uri = FileSystem.getDefaultUri(conf)
    +      val map = DFSUtil.getHaNnRpcAddresses(conf)
    --- End diff --
    
    looking at `AMDelegationTokenRenewer`, theres a more fundamental issue with 
HDFS which spark is trying to work around. It should be checking for tokens 
being expired and issuing new ones, so avoiding the whole hoop-jumping exercise 
in `writeNewTokensToHDFS()`. Is there a JIRA for that issue? As that's clearly 
a problem broader than just spark. Get it fixed & backported to 2.7.x (maybe, 
2.6.x) and the problem goes away.


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