Hadoop Common
  1. Hadoop Common
  2. HADOOP-5877

Fix javac warnings in TestHDFSServerPorts, TestCheckpoint, TestNameEditsConfig, TestStartup and TestStorageRestore

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      All of these warnings relate to use of the deprecated SecondaryNameNode. Since the 2ndNN isn't going to be excised anytime soon, these should all be suppressed with as narrow of a suppression scope as possible.

        Activity

        Tom White made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Konstantin Shvachko made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Fix Version/s 0.21.0 [ 12313563 ]
        Resolution Fixed [ 1 ]
        Hide
        Konstantin Shvachko added a comment -

        I just committed this. Thank you Jakob.

        Show
        Konstantin Shvachko added a comment - I just committed this. Thank you Jakob.
        Hide
        Konstantin Shvachko added a comment - - edited

        +1
        Looks good to me.

        Show
        Konstantin Shvachko added a comment - - edited +1 Looks good to me.
        Hide
        Jakob Homan added a comment -

        It looks like our erstwhile squire Hudson has wandered off again... I ran the full test of suites and everything passed except failing-on-trunk TestJobHistory and the usual contrib cases. From a unit test perspective, the patch is ready to go.

        Show
        Jakob Homan added a comment - It looks like our erstwhile squire Hudson has wandered off again... I ran the full test of suites and everything passed except failing-on-trunk TestJobHistory and the usual contrib cases. From a unit test perspective, the patch is ready to go.
        Jakob Homan made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Jakob Homan added a comment -

        submitting patch.

        Show
        Jakob Homan added a comment - submitting patch.
        Jakob Homan made changes -
        Field Original Value New Value
        Attachment HADOOP-5877.patch [ 12408617 ]
        Hide
        Jakob Homan added a comment -

        Patch to implement these fixes:
        Test patch:

             [exec] +1 overall.  
             [exec] 
             [exec]     +1 @author.  The patch does not contain any @author tags.
             [exec] 
             [exec]     +1 tests included.  The patch appears to include 16 new or modified tests.
             [exec] 
             [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
             [exec] 
             [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
             [exec] 
             [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
             [exec] 
             [exec]     +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
             [exec] 
             [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.
        
        • Fixes all of the javac warnings in the above mentioned files. These all related to use of the deprecated secondary name node. These were fixed by suppressing the warning on the method it emanated from, rather than applying the annotation to the entire file.
        • Of note, in two places the SecondaryNameNode was a return type of a method and due to a bug in Java (http://bugs.sun.com/view_bug.do?bug_id=6460147) the warning suppression doesn't work and still generates a javac warning. This has been noted in the code.
        • In TestHDFSServerPorts the offending warning was suppressed and a new test that uses the backup node to test the equivalent functionality added. This is the best approach to take with replacing these tests with backupnode versions until the secondary namenode is removed, but doing so on the other cases is beyond the scope of this JIRA.
        • General clean up of the TestHDFSServerPorts class.
        • As part of the new test BackupNode had to become a public rather than package-private class in order to make it available for testing.
        Show
        Jakob Homan added a comment - Patch to implement these fixes: Test patch: [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 16 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. Fixes all of the javac warnings in the above mentioned files. These all related to use of the deprecated secondary name node. These were fixed by suppressing the warning on the method it emanated from, rather than applying the annotation to the entire file. Of note, in two places the SecondaryNameNode was a return type of a method and due to a bug in Java ( http://bugs.sun.com/view_bug.do?bug_id=6460147 ) the warning suppression doesn't work and still generates a javac warning. This has been noted in the code. In TestHDFSServerPorts the offending warning was suppressed and a new test that uses the backup node to test the equivalent functionality added. This is the best approach to take with replacing these tests with backupnode versions until the secondary namenode is removed, but doing so on the other cases is beyond the scope of this JIRA. General clean up of the TestHDFSServerPorts class. As part of the new test BackupNode had to become a public rather than package-private class in order to make it available for testing.
        Jakob Homan created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development