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

    https://github.com/apache/spark/pull/19272#discussion_r139625400
  
    --- Diff: 
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
 ---
    @@ -174,6 +178,16 @@ private[spark] class CoarseGrainedExecutorBackend(
     
     private[spark] object CoarseGrainedExecutorBackend extends Logging {
     
    +  private def addDelegationTokens(tokens: Array[Byte], sparkConf: 
SparkConf) {
    +    logInfo(s"Found delegation tokens of ${tokens.length} bytes")
    +    val hadoopConf = SparkHadoopUtil.get.newConfiguration(sparkConf)
    +    hadoopConf.set("hadoop.security.authentication", "Token")
    +    UserGroupInformation.setConfiguration(hadoopConf)
    +    val creds = SparkHadoopUtil.get.deserialize(tokens)
    +    // decode tokens and add them to the credentials
    +    
UserGroupInformation.getCurrentUser.addCredentials(SparkHadoopUtil.get.deserialize(tokens))
    +  }
    --- End diff --
    
    use the val above: UserGroupInformation.getCurrentUser.addCredentials(creds)


---

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

Reply via email to