yqwang-ms commented on a change in pull request #28323:
URL: https://github.com/apache/spark/pull/28323#discussion_r414334546



##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -2408,8 +2408,19 @@ private[spark] object Utils extends Logging {
    * overridden by the `SPARK_USER` environment variable.
    */
   def getCurrentUserName(): String = {
-    Option(System.getenv("SPARK_USER"))
-      .getOrElse(UserGroupInformation.getCurrentUser().getShortUserName())
+    getCurrentUgi().getShortUserName()

Review comment:
       Is it safe to also change this to be getUserName()?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to