Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-938

Replace calls to UGI.getUserName() with UGI.getShortUserName()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: hdfs-client, namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      HADOOP-6526 details why UGI.getUserName() will not work to identify users. Until the proposed UGI.getLocalName() is implemented, calls to getUserName() should be replaced with the short name.

      1. HDFS-938-BP20-2.patch
        18 kB
        Boris Shkolnik
      2. HDFS-938-BP20-1.patch
        19 kB
        Boris Shkolnik
      3. HDFS-938.patch
        24 kB
        Jakob Homan
      4. contrib.ivy.jackson.patch-3
        5 kB
        Boris Shkolnik
      5. contrib.ivy.jackson.patch-1
        4 kB
        Boris Shkolnik
      6. contrib.ivy.jackson.patch-1
        4 kB
        Boris Shkolnik
      7. contrib.ivy.jackson.patch
        3 kB
        Boris Shkolnik

        Issue Links

          Activity

          Hide
          Jakob Homan added a comment -

          Patch implements changes as described.

          Show
          Jakob Homan added a comment - Patch implements changes as described.
          Hide
          Jakob Homan added a comment -

          submitting patch.

          Show
          Jakob Homan added a comment - submitting patch.
          Hide
          Boris Shkolnik added a comment -

          +1
          This patch does replace calls to getUserName() to getShortUserName()

          Show
          Boris Shkolnik added a comment - +1 This patch does replace calls to getUserName() to getShortUserName()
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12434446/HDFS-938.patch
          against trunk revision 903906.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 39 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed core unit tests.

          -1 contrib tests. The patch failed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/215/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/215/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/215/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/215/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12434446/HDFS-938.patch against trunk revision 903906. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 39 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/215/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/215/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/215/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/215/console This message is automatically generated.
          Hide
          Jakob Homan added a comment -

          I can't reproduce the test failures:

          Testsuite: org.apache.hadoop.hdfs.server.datanode.TestDataNodeMetrics
          Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 44.085 sec
          ---
          Testsuite: org.apache.hadoop.hdfs.server.namenode.TestBackupNode
          Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 17.772 sec

          Contrib test failure is known bad cactus issue.
          Going to commit.

          Show
          Jakob Homan added a comment - I can't reproduce the test failures: Testsuite: org.apache.hadoop.hdfs.server.datanode.TestDataNodeMetrics Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 44.085 sec --- Testsuite: org.apache.hadoop.hdfs.server.namenode.TestBackupNode Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 17.772 sec Contrib test failure is known bad cactus issue. Going to commit.
          Hide
          Jakob Homan added a comment -

          I have committed this. Resolving.

          Show
          Jakob Homan added a comment - I have committed this. Resolving.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #184 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/184/)
          . Replace calls to UGI.getUserName() with UGI.getShortUserName().
          (jghoman)

          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #184 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/184/ ) . Replace calls to UGI.getUserName() with UGI.getShortUserName(). (jghoman)
          Hide
          Boris Shkolnik added a comment -

          HDFS-938-BP20-1.patch: for previous version, not to commit

          Show
          Boris Shkolnik added a comment - HDFS-938 -BP20-1.patch: for previous version, not to commit
          Hide
          Boris Shkolnik added a comment -

          for previous version, not to commit
          adds ivy dependency for jackson json library

          Show
          Boris Shkolnik added a comment - for previous version, not to commit adds ivy dependency for jackson json library
          Hide
          Jakob Homan added a comment -

          For the contrib patch, the eclipse classpath hasn't been updated, leading to test-patch -1s.

          Show
          Jakob Homan added a comment - For the contrib patch, the eclipse classpath hasn't been updated, leading to test-patch -1s.
          Hide
          Boris Shkolnik added a comment -

          added eclipse.template/.classpath to include JSON libs

          Show
          Boris Shkolnik added a comment - added eclipse.template/.classpath to include JSON libs
          Hide
          Boris Shkolnik added a comment -

          moving ivy configuration stuff to HADOOP-6544

          Show
          Boris Shkolnik added a comment - moving ivy configuration stuff to HADOOP-6544
          Hide
          Jakob Homan added a comment -

          For the 938 backport, looks like you got all the references in HDFS. Since this patch is being backported in three pieces, rather than the usual one, I have a question as to whether it's correct that org/apache/hadoop/security/TestGroupMappingServiceRefresh.java is being patched here?

          Show
          Jakob Homan added a comment - For the 938 backport, looks like you got all the references in HDFS. Since this patch is being backported in three pieces, rather than the usual one, I have a question as to whether it's correct that org/apache/hadoop/security/TestGroupMappingServiceRefresh.java is being patched here?
          Hide
          Boris Shkolnik added a comment -

          address Jacob comments for HDFS-938-BP20-2.patch.
          removed TestGroupMappingServiceRefresh.java changes.

          Show
          Boris Shkolnik added a comment - address Jacob comments for HDFS-938 -BP20-2.patch. removed TestGroupMappingServiceRefresh.java changes.
          Hide
          Jakob Homan added a comment -

          +1

          Show
          Jakob Homan added a comment - +1
          Hide
          Hudson added a comment -

          Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #146 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/146/)

          Show
          Hudson added a comment - Integrated in Hdfs-Patch-h2.grid.sp2.yahoo.net #146 (See http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h2.grid.sp2.yahoo.net/146/ )
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #275 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/275/)

          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #275 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/275/ )

            People

            • Assignee:
              Jakob Homan
              Reporter:
              Jakob Homan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development