Hadoop Common
  1. Hadoop Common
  2. HADOOP-7833

Inner classes of org.apache.hadoop.ipc.protobuf.HadoopRpcProtos generates findbugs warnings which results in -1 for findbugs

    Details

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

      Description

      findbugs reports the following medium priority warnings for some inner class in the generated class ./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/protobuf/HadoopRpcProtos.java:

      • SE_BAD_FIELD_STORE: Non-serializable value stored into instance field of a serializable class
      • SE_BAD_FIELD: Non-transient non-serializable instance field in serializable class
      • UCF_USELESS_CONTROL_FLOW: Useless control flow

      This can be fixed by adding the following findbugs exclude filter:

      + <Match>
      + <!-- protobuf generated code -->
      + <Class name="~org\.apache\.hadoop\.ipc\.protobuf\.HadoopRpcProtos.*"/>
      + </Match>

      which will exclude all inner classes of org.apache.hadoop.ipc.protobuf.HadoopRpcProtos

      1. HADOOP-7833.patch
        0.6 kB
        John Lee
      2. HADOOP-7833.patch
        0.6 kB
        John Lee

        Activity

        Hide
        John Lee added a comment -

        Added a findbugs filter to exclude inner classes of org.apache.hadoop.ipc.protobuf.HadoopRpcProtos

        Show
        John Lee added a comment - Added a findbugs filter to exclude inner classes of org.apache.hadoop.ipc.protobuf.HadoopRpcProtos
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12504144/HADOOP-7833.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 javadoc. The javadoc tool appears to have generated 15 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 (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 passed unit tests in .

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/382//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/382//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/12504144/HADOOP-7833.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 javadoc. The javadoc tool appears to have generated 15 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 (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 passed unit tests in . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/382//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/382//console This message is automatically generated.
        Hide
        John Lee added a comment -

        In response to:

        -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.

        This patch does not have any new or modified tests because it was modifying a findbugs filter file. It was tested by running mvn compile findbugs:findbugs in the hadoop-common-project sub-directory and I verified by examining hadoop-common/target/findbugsXml.xml file for the absence of any org.apache.hadoop.ipc.protobuf.HadoopRpcProtos related warnings. Additionally, this build received a +1 findbugs indicating the absence of org.apache.hadoop.ipc.protobuf.HadoopRpcProtos related warnings.

        The -1 javadocs is an issue which is unrelated to this patch, as no Java code was updated.

        Show
        John Lee added a comment - In response to: -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. This patch does not have any new or modified tests because it was modifying a findbugs filter file. It was tested by running mvn compile findbugs:findbugs in the hadoop-common-project sub-directory and I verified by examining hadoop-common/target/findbugsXml.xml file for the absence of any org.apache.hadoop.ipc.protobuf.HadoopRpcProtos related warnings. Additionally, this build received a +1 findbugs indicating the absence of org.apache.hadoop.ipc.protobuf.HadoopRpcProtos related warnings. The -1 javadocs is an issue which is unrelated to this patch, as no Java code was updated.
        Hide
        Suresh Srinivas added a comment -

        John, thanks for doing this. The warnings were introduced by me

        Can you remove the previous section, where I had tried to suppress these warnings (that did not work).

        Show
        Suresh Srinivas added a comment - John, thanks for doing this. The warnings were introduced by me Can you remove the previous section, where I had tried to suppress these warnings (that did not work).
        Hide
        John Lee added a comment -

        Removed the findbugs filter match for org.apache.hadoop.ipc.protobuf.HadoopRpcProtos, as requested by Suresh Srinivas.

        Show
        John Lee added a comment - Removed the findbugs filter match for org.apache.hadoop.ipc.protobuf.HadoopRpcProtos, as requested by Suresh Srinivas.
        Hide
        John Lee added a comment -

        Probably will still get -1 due to -1 javadoc, but no Java code was introduced in this patch.

        Show
        John Lee added a comment - Probably will still get -1 due to -1 javadoc, but no Java code was introduced in this patch.
        Hide
        John Lee added a comment -

        Hi Suresh,

        Updated the filter to only match the inner classes now.
        Thanks for taking a look at this.

        John

        Show
        John Lee added a comment - Hi Suresh, Updated the filter to only match the inner classes now. Thanks for taking a look at this. John
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12504275/HADOOP-7833.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 javadoc. The javadoc tool appears to have generated 15 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 (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 passed unit tests in .

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/385//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/385//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/12504275/HADOOP-7833.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 javadoc. The javadoc tool appears to have generated 15 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 (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 passed unit tests in . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/385//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/385//console This message is automatically generated.
        Hide
        Suresh Srinivas added a comment -

        +1 for the patch.

        Show
        Suresh Srinivas added a comment - +1 for the patch.
        Hide
        Suresh Srinivas added a comment -

        I committed the patch. Thank you John.

        Show
        Suresh Srinivas added a comment - I committed the patch. Thank you John.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #1370 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1370/)
        HADOOP-7833. Fix findbugs warnings in protobuf generated code. Contributed by John Lee.

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204363
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1370 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1370/ ) HADOOP-7833 . Fix findbugs warnings in protobuf generated code. Contributed by John Lee. suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204363 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #1296 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1296/)
        HADOOP-7833. Fix findbugs warnings in protobuf generated code. Contributed by John Lee.

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204363
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1296 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1296/ ) HADOOP-7833 . Fix findbugs warnings in protobuf generated code. Contributed by John Lee. suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204363 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1320 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1320/)
        HADOOP-7833. Fix findbugs warnings in protobuf generated code. Contributed by John Lee.

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204363
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1320 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1320/ ) HADOOP-7833 . Fix findbugs warnings in protobuf generated code. Contributed by John Lee. suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204363 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml
        Hide
        John Lee added a comment -

        Cool, thanks Suresh!

        Show
        John Lee added a comment - Cool, thanks Suresh!
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #904 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/904/)
        HADOOP-7833. Fix findbugs warnings in protobuf generated code. Contributed by John Lee.

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204363
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #904 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/904/ ) HADOOP-7833 . Fix findbugs warnings in protobuf generated code. Contributed by John Lee. suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204363 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #870 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/870/)
        HADOOP-7833. Fix findbugs warnings in protobuf generated code. Contributed by John Lee.

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204363
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #870 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/870/ ) HADOOP-7833 . Fix findbugs warnings in protobuf generated code. Contributed by John Lee. suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204363 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/dev-support/findbugsExcludeFile.xml
        Hide
        Tsz Wo Nicholas Sze added a comment -

        I have merged this to 0.23.

        Show
        Tsz Wo Nicholas Sze added a comment - I have merged this to 0.23.

          People

          • Assignee:
            John Lee
            Reporter:
            John Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development