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

    https://github.com/apache/spark/pull/607#discussion_r12212638
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala 
---
    @@ -35,15 +35,28 @@ class SparkHadoopUtil {
       val conf: Configuration = newConfiguration()
       UserGroupInformation.setConfiguration(conf)
     
    -  def runAsUser(user: String)(func: () => Unit) {
    +  /** Creates a UserGroupInformation for Spark based on SPARK_USER 
environment variable. */
    +  def createSparkUser(): Option[UserGroupInformation] = {
    +    val user = 
Option(System.getenv("SPARK_USER")).getOrElse(SparkContext.SPARK_UNKNOWN_USER)
         if (user != SparkContext.SPARK_UNKNOWN_USER) {
    -      val ugi = UserGroupInformation.createRemoteUser(user)
    -      transferCredentials(UserGroupInformation.getCurrentUser(), ugi)
    -      ugi.doAs(new PrivilegedExceptionAction[Unit] {
    -        def run: Unit = func()
    -      })
    +      Some(UserGroupInformation.createRemoteUser(user))
    --- End diff --
    
    Yeah, I noticed later that this is mainly talking about the executors 
(d'oh).


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

Reply via email to