Hadoop Common
  1. Hadoop Common
  2. HADOOP-8585

Fix initialization circularity between UserGroupInformation and HadoopConfiguration

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.2-alpha
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Fix findbugs warning about initialization circularity between UserGroupInformation and UserGroupInformation#HadoopConfiguration.

      From the findbugs text:

      Initialization circularity between org.apache.hadoop.security.UserGroupInformation and org.apache.hadoop.security.UserGroupInformation$HadoopConfiguration
      	
      
      Bug type IC_INIT_CIRCULARITY (click for details)
      In class org.apache.hadoop.security.UserGroupInformation
      In class org.apache.hadoop.security.UserGroupInformation$HadoopConfiguration
      At UserGroupInformation.java:[lines 76-1395]
      
      1. HDFS-3632.001.patch
        3 kB
        Colin Patrick McCabe

        Issue Links

          Activity

          Hide
          Aaron T. Myers added a comment -

          The patch looks good to me. +1 pending Jenkins.

          Show
          Aaron T. Myers added a comment - The patch looks good to me. +1 pending Jenkins.
          Hide
          Hadoop QA added a comment -

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

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

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no new tests are needed for this patch.
          Also please list what manual steps were performed to verify this patch.

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

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

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

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

          -1 core tests. The patch failed these unit tests in hadoop-common-project/hadoop-common:

          org.apache.hadoop.ha.TestZKFailoverController
          org.apache.hadoop.io.file.tfile.TestTFileByteArrays
          org.apache.hadoop.io.file.tfile.TestTFileJClassComparatorByteArrays

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1188//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1188//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/12535953/HDFS-3632.001.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in hadoop-common-project/hadoop-common: org.apache.hadoop.ha.TestZKFailoverController org.apache.hadoop.io.file.tfile.TestTFileByteArrays org.apache.hadoop.io.file.tfile.TestTFileJClassComparatorByteArrays +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1188//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1188//console This message is automatically generated.
          Hide
          Aaron T. Myers added a comment -

          I've just committed this to trunk and branch-2. Thanks a lot for fixing this so quickly, Colin.

          Show
          Aaron T. Myers added a comment - I've just committed this to trunk and branch-2. Thanks a lot for fixing this so quickly, Colin.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #2520 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2520/)
          HADOOP-8585. Fix initialization circularity between UserGroupInformation and HadoopConfiguration. Contributed by Colin Patrick McCabe. (Revision 1360498)

          Result = SUCCESS
          atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360498
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2520 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2520/ ) HADOOP-8585 . Fix initialization circularity between UserGroupInformation and HadoopConfiguration. Contributed by Colin Patrick McCabe. (Revision 1360498) Result = SUCCESS atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360498 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #2473 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2473/)
          HADOOP-8585. Fix initialization circularity between UserGroupInformation and HadoopConfiguration. Contributed by Colin Patrick McCabe. (Revision 1360498)

          Result = FAILURE
          atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360498
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2473 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2473/ ) HADOOP-8585 . Fix initialization circularity between UserGroupInformation and HadoopConfiguration. Contributed by Colin Patrick McCabe. (Revision 1360498) Result = FAILURE atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360498 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #2455 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2455/)
          HADOOP-8585. Fix initialization circularity between UserGroupInformation and HadoopConfiguration. Contributed by Colin Patrick McCabe. (Revision 1360498)

          Result = SUCCESS
          atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360498
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2455 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2455/ ) HADOOP-8585 . Fix initialization circularity between UserGroupInformation and HadoopConfiguration. Contributed by Colin Patrick McCabe. (Revision 1360498) Result = SUCCESS atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360498 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
          Hide
          Owen O'Malley added a comment -

          Wouldn't it have been easier to just suppress the warning as a false alarm?

          Show
          Owen O'Malley added a comment - Wouldn't it have been easier to just suppress the warning as a false alarm?
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #1101 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1101/)
          HADOOP-8585. Fix initialization circularity between UserGroupInformation and HadoopConfiguration. Contributed by Colin Patrick McCabe. (Revision 1360498)

          Result = FAILURE
          atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360498
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1101 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1101/ ) HADOOP-8585 . Fix initialization circularity between UserGroupInformation and HadoopConfiguration. Contributed by Colin Patrick McCabe. (Revision 1360498) Result = FAILURE atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360498 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #1134 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1134/)
          HADOOP-8585. Fix initialization circularity between UserGroupInformation and HadoopConfiguration. Contributed by Colin Patrick McCabe. (Revision 1360498)

          Result = SUCCESS
          atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360498
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1134 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1134/ ) HADOOP-8585 . Fix initialization circularity between UserGroupInformation and HadoopConfiguration. Contributed by Colin Patrick McCabe. (Revision 1360498) Result = SUCCESS atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1360498 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
          Hide
          Aaron T. Myers added a comment -

          Wouldn't it have been easier to just suppress the warning as a false alarm?

          That would certainly work, but it doesn't seem much easier to me. I also don't see how the method used by this patch could possibly cause any problems, as it changes the behavior back to what it was before the recently-committed HDFS-3568, i.e. each invocation of newLoginContext will create a new HadoopConfiguration object.

          Show
          Aaron T. Myers added a comment - Wouldn't it have been easier to just suppress the warning as a false alarm? That would certainly work, but it doesn't seem much easier to me. I also don't see how the method used by this patch could possibly cause any problems, as it changes the behavior back to what it was before the recently-committed HDFS-3568 , i.e. each invocation of newLoginContext will create a new HadoopConfiguration object.
          Hide
          Owen O'Malley added a comment -

          Clearly they have the same effect, because the configuration doesn't have any state. The new approach just creates a throw away object for each invocation. In the future, you should probably just revert the previous fix and update it rather than create a new jira the next day.

          Show
          Owen O'Malley added a comment - Clearly they have the same effect, because the configuration doesn't have any state. The new approach just creates a throw away object for each invocation. In the future, you should probably just revert the previous fix and update it rather than create a new jira the next day.
          Hide
          Aaron T. Myers added a comment -

          Clearly they have the same effect, because the configuration doesn't have any state. The new approach just creates a throw away object for each invocation.

          This is not really a "new" approach. This is going back to the way it was done before HDFS-3568.

          In the future, you should probably just revert the previous fix and update it rather than create a new jira the next day.

          We routinely file follow-up JIRAs to fix trivial problems that were introduced by a recent commit. I don't see how this is any different.

          Show
          Aaron T. Myers added a comment - Clearly they have the same effect, because the configuration doesn't have any state. The new approach just creates a throw away object for each invocation. This is not really a "new" approach. This is going back to the way it was done before HDFS-3568 . In the future, you should probably just revert the previous fix and update it rather than create a new jira the next day. We routinely file follow-up JIRAs to fix trivial problems that were introduced by a recent commit. I don't see how this is any different.

            People

            • Assignee:
              Colin Patrick McCabe
              Reporter:
              Colin Patrick McCabe
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development