Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-500

Fix lingering and new javac warnings

    Details

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

      Description

      The broken javac warnings issues documented in HADOOP-6124 have allowed some new javac warnings into the codebase, and there are a few lingering from the previous code cleanup. These should be fixed. Patch shortly.

      1. HDFS-500.patch
        1 kB
        Jakob Homan

        Activity

        Jakob Homan created issue -
        Hide
        Jakob Homan added a comment -

        Patch removes all lingering warnings from hdfs that can be removed. There are five remaining:

            [javac] /Users/jhoman/work/git/hadoop-hdfs/src/java/org/apache/hadoop/hdfs/DeprecatedUTF8.java:35: warning: [deprecation] org.apache.hadoop.io.UTF8 in org.apache.hadoop.io has been deprecated
            [javac] 1 warning
            [javac] /Users/jhoman/work/git/hadoop-hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java:571: warning: [deprecation] org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode in org.apache.hadoop.hdfs.server.namenode has been deprecated
            [javac] /Users/jhoman/work/git/hadoop-hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java:94: warning: [deprecation] org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode in org.apache.hadoop.hdfs.server.namenode has been deprecated
            [javac] /Users/jhoman/work/git/hadoop-hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestDFSPermission.java:162: warning: [deprecation] create(org.apache.hadoop.fs.Path,org.apache.hadoop.fs.permission.FsPermission,boolean,int,short,long,org.apache.hadoop.util.Progressable) in org.apache.hadoop.fs.FileSystem has been deprecated
            [javac] /Users/jhoman/work/git/hadoop-hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestFSInputChecker.java:56: warning: [deprecation] create(org.apache.hadoop.fs.Path,org.apache.hadoop.fs.permission.FsPermission,boolean,int,short,long,org.apache.hadoop.util.Progressable) in org.apache.hadoop.fs.FileSystem has been deprecated
            [javac] /Users/jhoman/work/git/hadoop-hdfs/src/test/hdfs/org/apache/hadoop/security/TestPermission.java:88: warning: [deprecation] create(org.apache.hadoop.fs.Path,org.apache.hadoop.fs.permission.FsPermission,boolean,int,short,long,org.apache.hadoop.util.Progressable) in org.apache.hadoop.fs.FileSystem has been deprecated
            [javac] 5 warnings
        

        The three warnings related to the create method are being resolved in HDFS-490. The remaining three are due to the Java bug that does not correctly ignore deprecations when directed to do so (as documented in MAPREDUCE-623 and HADOOP-5877). Still waiting for consensus on how to handle these zombie warnings.

        There are quite a few warnings not directly in the hdfs package, but that exist within the hdfs-with-mr tests from Mapred's Great Package Deprecation of 2008. Mapred's still working on how to handle these, but it seems to me that having these tests in hdfs creates a cycle that runs counter to the goal of the project split.

        Show
        Jakob Homan added a comment - Patch removes all lingering warnings from hdfs that can be removed. There are five remaining: [javac] /Users/jhoman/work/git/hadoop-hdfs/src/java/org/apache/hadoop/hdfs/DeprecatedUTF8.java:35: warning: [deprecation] org.apache.hadoop.io.UTF8 in org.apache.hadoop.io has been deprecated [javac] 1 warning [javac] /Users/jhoman/work/git/hadoop-hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java:571: warning: [deprecation] org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode in org.apache.hadoop.hdfs.server.namenode has been deprecated [javac] /Users/jhoman/work/git/hadoop-hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java:94: warning: [deprecation] org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode in org.apache.hadoop.hdfs.server.namenode has been deprecated [javac] /Users/jhoman/work/git/hadoop-hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestDFSPermission.java:162: warning: [deprecation] create(org.apache.hadoop.fs.Path,org.apache.hadoop.fs.permission.FsPermission,boolean,int,short,long,org.apache.hadoop.util.Progressable) in org.apache.hadoop.fs.FileSystem has been deprecated [javac] /Users/jhoman/work/git/hadoop-hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestFSInputChecker.java:56: warning: [deprecation] create(org.apache.hadoop.fs.Path,org.apache.hadoop.fs.permission.FsPermission,boolean,int,short,long,org.apache.hadoop.util.Progressable) in org.apache.hadoop.fs.FileSystem has been deprecated [javac] /Users/jhoman/work/git/hadoop-hdfs/src/test/hdfs/org/apache/hadoop/security/TestPermission.java:88: warning: [deprecation] create(org.apache.hadoop.fs.Path,org.apache.hadoop.fs.permission.FsPermission,boolean,int,short,long,org.apache.hadoop.util.Progressable) in org.apache.hadoop.fs.FileSystem has been deprecated [javac] 5 warnings The three warnings related to the create method are being resolved in HDFS-490 . The remaining three are due to the Java bug that does not correctly ignore deprecations when directed to do so (as documented in MAPREDUCE-623 and HADOOP-5877 ). Still waiting for consensus on how to handle these zombie warnings. There are quite a few warnings not directly in the hdfs package, but that exist within the hdfs-with-mr tests from Mapred's Great Package Deprecation of 2008. Mapred's still working on how to handle these, but it seems to me that having these tests in hdfs creates a cycle that runs counter to the goal of the project split.
        Jakob Homan made changes -
        Field Original Value New Value
        Attachment HDFS-500.patch [ 12414457 ]
        Hide
        Jakob Homan added a comment -

        submitting patch.

        Show
        Jakob Homan added a comment - submitting patch.
        Jakob Homan made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Jakob Homan added a comment -

        canceling patch to get Hudson's attention

        Show
        Jakob Homan added a comment - canceling patch to get Hudson's attention
        Jakob Homan made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Hide
        Jakob Homan added a comment -

        Yo, Hudson!

        Show
        Jakob Homan added a comment - Yo, Hudson!
        Jakob Homan made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Jakob Homan added a comment -

        oh, well. No Hudson. Manually, all unit tests patch. test-patch is fine:

             [exec] -1 overall.  
             [exec] 
             [exec]     +1 @author.  The patch does not contain any @author tags.
             [exec] 
             [exec]     -1 tests included.  The patch doesn't appear to include any new or modified tests.
             [exec]                         Please justify why no new tests are needed for this patch.
             [exec]                         Also please list what manual steps were performed to verify this patch.
             [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 release audit.  The applied patch does not increase the total number of release audit warnings.
        Show
        Jakob Homan added a comment - oh, well. No Hudson. Manually, all unit tests patch. test-patch is fine: [exec] -1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] -1 tests included. The patch doesn't appear to include any new or modified tests. [exec] Please justify why no new tests are needed for this patch. [exec] Also please list what manual steps were performed to verify this patch. [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 release audit. The applied patch does not increase the total number of release audit warnings.
        Hide
        Jakob Homan added a comment -

        I meant, test-patch is fine as this is just a javac cleanup and no new tests are needed.

        Show
        Jakob Homan added a comment - I meant, test-patch is fine as this is just a javac cleanup and no new tests are needed.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        If I remember correctly, we need @deprecated in the javadoc, otherwise, there will be some warnings. I suspect test-patch fails to detect these new warnings.

        Show
        Tsz Wo Nicholas Sze added a comment - If I remember correctly, we need @deprecated in the javadoc, otherwise, there will be some warnings. I suspect test-patch fails to detect these new warnings.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        > If I remember correctly, we need @deprecated in the javadoc, ...
        I tried the patch and seemed that there is no javadoc problems.

        Show
        Tsz Wo Nicholas Sze added a comment - > If I remember correctly, we need @deprecated in the javadoc, ... I tried the patch and seemed that there is no javadoc problems.
        Hide
        Hadoop QA added a comment -

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

        +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 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 passed core unit tests.

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/34/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/34/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/34/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/34/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/12414457/HDFS-500.patch against trunk revision 799146. +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 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 passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/34/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/34/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/34/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-vesta.apache.org/34/console This message is automatically generated.
        Konstantin Shvachko made changes -
        Hadoop Flags [Reviewed]
        Fix Version/s 0.21.0 [ 12314046 ]
        Affects Version/s 0.21.0 [ 12314046 ]
        Component/s name-node [ 12312926 ]
        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.
        Konstantin Shvachko made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #35 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/35/)
        . Deprecate NameNode methods deprecated in NameNodeProtocol. Contributed by Jakob Homan.

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #35 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/35/ ) . Deprecate NameNode methods deprecated in NameNodeProtocol. Contributed by Jakob Homan.
        Tom White made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development