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

    https://github.com/apache/spark/pull/18519#discussion_r126791991
  
    --- Diff: 
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
 ---
    @@ -232,6 +240,14 @@ private[spark] object CoarseGrainedExecutorBackend 
extends Logging {
         }
       }
     
    +  /** Add Credentials to the currently logged in user. */
    +  private def addCredentials(creds: Credentials): Unit = {
    +    logInfo(s"Adding ${creds.numberOfTokens()} tokens and 
${creds.numberOfSecretKeys()} secret" +
    +      s"keys to the current user's credentials.")
    +
    +    UserGroupInformation.getCurrentUser().addCredentials(creds)
    --- End diff --
    
    This looks like `SparkHadoopUtil.addCurrentUserCredentials`. That's only 
implemented on `YarnSparkHadoopUtil` for historical reasons, but since we 
dropped Hadoop 1.x support, the implementation can move to `core/` now, and 
you'd avoid this copy of that code.


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

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

Reply via email to