Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-6558

Utils.getCurrentUserName returns the full principal name instead of login name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.3.0
    • 1.3.1, 1.4.0
    • Spark Core
    • None

    Description

      Utils.getCurrentUserName returns UserGroupInformation.getCurrentUser().getUserName() when SPARK_USER isn't set. It should return UserGroupInformation.getCurrentUser().getShortUserName()

      getUserName() returns the users full principal name (ie user1@CORP.COM). getShortUserName() returns just the users login name (user1).

      This just happens to work on YARN because the Client code sets:
      env("SPARK_USER") = UserGroupInformation.getCurrentUser().getShortUserName()

      Attachments

        Activity

          People

            tgraves Thomas Graves
            tgraves Thomas Graves
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: