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

    https://github.com/apache/spark/pull/17335#discussion_r106700053
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala 
---
    @@ -353,6 +354,25 @@ class SparkHadoopUtil extends Logging {
         }
         buffer.toString
       }
    +
    +  /**
    +   * Run some code as the real logged in user (which may differ from the 
current user, for
    +   * example, when using proxying).
    +   */
    +  private[spark] def doAsRealUser[T](fn: => T): T = {
    +    val currentUser = UserGroupInformation.getCurrentUser()
    --- End diff --
    
    Hmmm... I'm not so sure this will work in all cases. Can you test this with 
both `spark.sql.hive.metastore.jars` and `spark.sql.hive.metastore.version` set?
    
    The problem is that this class is loaded by Spark's main class loader, 
while `HiveClientImpl` comes from a different class loader. So 
`UserGroupInformation` might be a different class in certain cases. It's the 
same reasoning why `HiveClientImpl` class does its own `loginUserFromKeytab` 
around L110.


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