Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-9352

Expose UGI.setLoginUser for tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.23.0, 2.0.0-alpha, 3.0.0-alpha1
    • 0.23.7, 2.1.0-beta
    • security
    • None

    Description

      The UGI.setLoginUser method is not publicly exposed, which makes it impossible to correctly test code executed outside of an explicit doAs. getCurrentUser/getLoginUser will always vivify the login user from the user running the test, and not an arbitrary user to be determined by the test. The method is documented with why it's not ready for prime-time, but it's good enough for tests.

      Attachments

        1. HADOOP-9352.patch
          2 kB
          Daryn Sharp
        2. HADOOP-9352.branch-23.patch
          3 kB
          Daryn Sharp

        Issue Links

          Activity

            People

              daryn Daryn Sharp
              daryn Daryn Sharp
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: