Github user jerryshao commented on the issue:

    https://github.com/apache/spark/pull/21138
  
    Hi @mridulm , thanks a lot for your comments.
    
    UGI.loginUserFromKeytab is not existed any more in Spark 2.3+ 
(https://github.com/apache/spark/commit/dc2714da50ecba1bf1fdf555a82a4314f763a76e#diff-6fd847124f8eae45ba2de1cf7d6296fe).
    
    Actually it is the code here 
(https://github.com/apache/spark/blob/e77d62a722941ce1cf235861d21b1f73089be134/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIService.scala#L53)
 in ThriftServer and somewhere else in Hive Library which calls 
UGI.loginUserFromKeytab, note here the principal and keytab is hive one, not 
sure if we can remove this.
    
    PS. I saw two "Login successful" from UGI in the thrift server log, but I 
can only find out one login in the thrift server code. So I assume another one 
is in the Hive library.
    
    Yes, I agree with you, ideally we should not login from keytab 
unnecessarily, but thinking of thrift server as a Spark application, it doesn't 
know the context of Spark's UGI and do login to refresh the UGI in its context, 
seems we cannot defend user to do that in the user layer. So I think my fix 
could workaround such issue, though may not be the elegant fix.


---

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

Reply via email to